Disaster Recovery & Single Message Restore
ken at oceana.com
Wed Dec 22 12:47:51 EST 2004
Doug Koobs wrote:
> I'm testing our backup and recovery process. For backups, we shut down
> cyrus-imapd (installed via Simon's rpm's) and postfix, use cpio to backup
> /var/spool/mail and /var/lib/imap and /etc, then restart cyrus-imapd and
> I've built a restore server, installed postfix and cyrus. Here is what I
> would like to do:
> Create a test user and mailbox to verify that SMTP & IMAP are working
> together properly.
> Remove test mailbox and delete user
> Stop postfix and cyrus-imapd
> Restore /var/spool/imap and /var/lib/imap
> Make sure all files/directories are owned by cyrus:mail
> Copy user entries back into /etc/passwd and /etc/shadow (I'm using passwd
> for Cyrus authentication)
> At this point, do I need to run reconstruct? If so, any options? I'm
> thinking I don't need to use it at all, since I stopped postfix and
> cyrus-imapd. Am I missing anything?
If the contents of the mailstore is static when you do the
backup/restore, then reconstruct *shouldn't* be necessary.
> In regards to restoring just an email that someone accidentally deleted, how
> does this sound:
> Create a top-level folder that will be the restore target
> Restore the contents of the directory containing the user's folder that
> needs to be restored into the directory containing the restore folder
> reconstruct that folder, and grant access to the user
> After the users has copied over the missing message to his own mailbox,
> remove the restore mailbox.
It can be done a lot simpler than that, and without having to involve
the user. Since message UIDs are guaranteed to be unique, no existing
message will have the same UID as a deleted one. You can simply restore
the deleted messages directly into the mailbox from which they came and
then reconstruct the mailbox to get them added to cyrus.index and
I do this more frequently than I would like, but its works just fine.
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26 Orchard Park, NY 14127
--PGP Public Key-- http://www.oceana.com/~ken/ksm.pgp
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus