All the versions of this article: [English] [français]
Le 25/1/2006, 00:00 Postgrey crashed, Database lost ?
This morning, the web site was down, certainly due to a ram issue. However, it is now back online.
After the reboot, postgrey, an anti-spam daemon using an automagically filled whitelist database refused to start with the following error in syslog:
ERROR: can’t create DB environment: No such file or directory
I found that the greylisting database in /var/lib/postgrey was corrupted. When I strace postgrey start script with strace -f /etc/init.d/postgrey start I saw misc error messages such as "__db.001: no such file or directory".
After searching the Internet, I found a guy who had the same error and simply destroyed its greylisting berkeley database (sniff, my db ? dead ?). But I didn’t want to loose mine, so I do the following :
# check that db4.3 tools are installed
# (use your version and package manager for this step)
apt-get install db4.3-util
# dump the current databases :
cd /var/lib/postgrey
db4.3_dump -p postgrey.db >/var/tmp/postgrey.db
db4.3_dump -p postgrey_clients.db >/var/tmp/postgrey_clients.db
# Kill everybody
killall -15 postgrey
# (this killall said logically "no process killed")
# destroy the pid file and all the database files
# to start with fresh entries
rm /var/run/postgrey.pid
rm /var/lib/postgrey/* -f
# start postgrey :
/etc/init.d/postgrey start
# here postgrey is up and running, (with an emtpy db of course)
# So we stop it :
/etc/init.d/postgrey stop
# and restore the db from the dump :
db4.3_load -f /var/tmp/postgrey_clients.db postgrey_clients.db
db4.3_load -f /var/tmp/postgrey.db postgrey.db
# that's all, just restart postgrey :
/etc/init.d/postgrey startHere it is. I hope you’ll find this tip useful. See you soon.
Tags
[Geekland] - [Logiciels Libres] -
Who's there?
Welcome on Benjamin Sonntag's blog, web entrepreneur, Linux expert and free-software-savvy half-geek.
Here you will find geek tuff, tricks and tips and friendly ads, personal histories and a bunch of politics ...
On the same topic ...
- le 25 January 2006AlternC 0.9.3.1 is out !
- le 16 April 2007named zone sonntag.eu.org: refused notify from non-master
- le 29 December 200926c3. Day 2 : A Microntroller-based led panel from Jimmie
- le 30 December 200926c3. Day 4 : The LOL Shield, last post : SPACE INVADER !
- le 12 MayNice style for forced form fields
- le 20 JulyArduino driver for Sure0832 led panel
In the Octopuce boat ...
- 27 August – SFTP pour Openssh : comment logguer qui a fait quoi ?
- 30 July – Octopuce SARL recherche un développeur PHP/MySQL
- 27 July – IPv6 à Octopuce, une réalité
- 6 February – DManager : Nouvelle version du porte document en ligne
- 14 January – Varnish & Failover, exemple de VCL de répartition de charge intelligente ...
La Quadrature du Net
- 1 September – Fuite ACTA : Texte consolidé 2010 07 13 (négociations de Lucerne)
- 18 August – Santé, Internet : la comédie de l'ACTA a assez duré
- 15 August – L'intégralité du rapport de NKM sur la "neutralité" des réseaux
- 1 July – ACTA : Urgence à repenser brevets et droit d'auteur (lettre ouverte)
- 28 June – EXCLUSIF : des images des négociations de l'ACTA
Old stuff ...
- 29 juillet 2007 – Musique : Arcade Fire, Neon bible
- 24 janvier 2006 – Transferts de vidéos, films, dvd...
- 20 novembre 2009 – Une proposition de loi piégée ...
- 25 January 2006 – Postgrey crashed, Database lost ?
- 21 octobre 2006 – Lucie, la photoblogueuse multiforme...





