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 12 May 2010Nice style for forced form fields
- le 20 July 2010Arduino driver for Sure0832 led panel
- le 20 JanuaryDNS & AlternC - How does it work?
Chez Aline et ses Animfolies'
- 4 February – Encore 2 pages…
- 29 January – Ma page préférée
- 28 January – Encore 2 nouvelles pages …
- 26 January – 2 nouvelles pages
- 22 January – ABCdaire
In the Octopuce boat ...
- 17 November 2011 – Octopuce SARL recherche un développeur PHP/MySQL
- 23 October 2011 – Octopuce à Metz (Libre et Entreprises)
- 23 October 2011 – Octopuce à Metz (Libre et Entreprises)
- 19 January 2011 – Comment utiliser les hooks de GIT pour mettre à jour automatiquement un site de développement
- 18 January 2011 – Hébergement de dépôts GIT sur un serveur via Gitosis
La Quadrature du Net
- 2 February – ACTA : Le Commissaire De Gucht ment au Parlement européen
- 30 January – Démontage des mensonges de la Commission européenne sur ACTA
- 26 January – ACTA signé par l'UE. Ensemble, nous devons le vaincre !
- 23 January – Après SOPA et PIPA aux États-Unis, ACTA arrive au Parlement européen
- 20 January – MegaUpload : l'industrie du copyright en guerre contre les créatures qu'elle a enfantées
Old stuff ...
- 8 janvier 2010 – Le Trou du Bon Chat : une perle chez Laurent Chemla
- 12 janvier 2010 – Facebook & vie privée, alerte générale !
- 25 janvier 2010 – ACTA vs Le reste du monde
- 25 juin 2010 – Apple : service push notification HS
- 12 May 2010 – Nice style for forced form fields





