restore from cyrdump

Marcus Schopen lists at localguru.de
Tue Dec 9 14:49:01 EST 2014


Am Mittwoch, den 10.12.2014, 02:36 +1100 schrieb Bron Gondwana:
> On Wed, Dec 10, 2014, at 02:03 AM, Willy Offermans wrote:
> > Hello Cyrus Friends,
> > 
> > On Sun, Dec 07, 2014 at 01:01:52PM +0100, Willy Offermans wrote:
> > > Dear Cyrus friends,
> > > 
> > > I want to simulate a possible crash of the company's mail server.
> > > At the moment the server works smoothly, but you never know... It is best
> > > to be prepared for it and to have possibilities to restore critical data.
> > > E-mail info was appointed to be one of the critical data.
> > > 
> > > So I picked one user and cyrdump his data into a file.
> > > 
> > > ``cyrdump -v user.$USER > /tmp/$USER.dump''
> > > 
> > > If I make a quick scan of the file, it looks like a dump of mails of the
> > > user. Moreover, there is flag info per mail subfolder. There is info about 
> > > subfolders and there is info about the mail IDs in each subfolder.
> > > Summarized, there is all the info needed to reconstruct the user's
> > > mailfolder and mails.
> > > 
> > > I created the mailbox lists
> > > 
> > > su - cyrus -c "ctl_mboxlist -d" > /tmp/mailboxes.txt
> > > 
> > > Now I want to restore the data of user.$USER on a different server.
> > > 
> > > How should I proceed? I might write a script to reconstruct the data from
> > > the $USER.dump file, but I guess there is already a tool to do so. However
> > > I'm not aware of such tool and moreover I cannot find any info on
> > > http://www.cyrusimap.org/ concerning this. Can someone help me out?
> > > 
> > > To my opinion, the restore procedure should be well documented.
> > > 
> > > -- 
> > 
> > Is there nobody with a good suggestion?
> 
> Not really.  Most people seem to be using LVM snapshots.  We have a custom backup thing at FastMail.  Building a better backup/restore for Cyrus has been on my todo list for a long time, but I keep not getting time to work on it :(

Basically I run a simple master/replica setup and use LVM snaps in
combination with rsnapshot for disaster recovery. Those snaps were
archived with rdiff-backup later then.

Another idea might be imapsync. But depending on how big your cyrus
spool it will take its time. It's more a tool for moving mails between
imap servers.

I think a cyrus-replica setup is a good and stable way to handle a
crash. Any backup based methods will lose changes in between the cycles.

Ciao
Marcus




More information about the Info-cyrus mailing list