Recovery from crashed OS

Want some informations on MailCleaner internals ?

Moderators: FlorianB, Pascal, bourgeois, mentor

Posts: 22
Joined: Mon Apr 06, 2009 7:21 am

Recovery from crashed OS

Postby arminder » Sun May 24, 2009 7:03 pm

Greeting All!

First of all thanks to Olivier for putting together such a great product.

Now this is my first post and I'm trying to recover from a Mailcleaner slave which crashed and on fsck ended up with lots of files ending up in lost+found of /var partition. The server isn't booting since the OS corrupted up as well, missing init files and whole of /etc is gone as well. It took a last breath before dieing out on me where the status on master showed a lot of services down (can't remember which all).

I had prepared a new one and attached the drive of old server to the new one. Is there a method using which I can recover the quarantine mails and undelivered queue out of that drive and make it work on the new install. I haven't added the new one as slave yet.

If you need anything particular to ask to help me on this, feel free to ask.

Posts: 1348
Joined: Thu Jan 01, 1970 1:00 am

Re: Recovery from crashed OS

Postby olivier » Sun May 24, 2009 10:16 pm


first you should set up the new slave in the cluster, with the same ID as the crashed one.

Next, you will only need to copy the content of /var/mailcleaner/spam from the crashed disk (if still readable) to the new one to bring back the quarantines (the log traces are already in the master db).

For the processing queues, the directories are:

copy the contents to the new one and the messages will be processed.

Hope you can still access these files. But these are the only thing needed to get back all messages.
good luck !
Posts: 22
Joined: Mon Apr 06, 2009 7:21 am

Re: Recovery from crashed OS

Postby arminder » Mon May 25, 2009 6:03 am

Thanks Olivier!

My bad that I missed this thread and started on my own using the backup/restore approach from After creating a new one, I attached the drive of the old to it and mounted the partitions. I could recover most of those except for 90 odd header files which ended up in lost+found for /var partition. In fact, I ended up restoring the mysql master and slaves by replacing the files I tarred from old one after stopping mysql on new one. When I started the mysql instances, the replication started from the old log positions and found no errors. Then I copied over Exim's stage1, stage2 and stage4 folders, followed by greylist states & triplets, spam quarantine and finally content quarantine. Then I used the dump config scripts as was in I found that master wasn't able to connect to slave and could correct that updating the password in /etc/mailcleaner.conf on slave with old one. Since the entire /etc had vanished in crash, I could luckily get that password from my notes where I had put that password (wondering why I would ever need it, until now).

I could make it working with this and the queue in stage2 cleared out as well. Everything seems fine except for few odd spam mails I received with Spam tag in the subject, though I had set them to Quarantine and not tag and deliver. Any ideas what could be the problem?

Also since I had the old queue already delivered and spam & content quarantines are intact, shall I go ahead and recreate the slave using the process you explained here?


Return to “Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests