Backup and Restore strategies for Cyrus IMAP folders

Dave McMurtrie dgm+ at
Thu Apr 17 11:06:38 EDT 2003

On Thu, 17 Apr 2003, John Alton Tamplin wrote:

> There is still a potential race condition.  Imagine the next message id
> to use is 101.  Between the time Cyrus decides to use this message id
> for a new message and it actually writes it, Legato restores the file
> 101.  Now, Cyrus will write the new message to this file (either
> overwriting the newly-restored message or having a problem because the
> file already exists -- I haven't checked the code to see which).  I
> think it is safer to restore the files to a freshly created folder and
> reconstruct there.

I think Ken's previous point was that cyrus will not reuse a message ID.
If somebody had a message "101." and deleted it cyrus will never create
another "101." in that folder, hence no race condition.  Maybe I
misunderstood his post, though.

All this aside though, we chose to stick restored mail into a separate
folder with a separate quota root.  We did this mostly because we didn't
want to have to dig through somebody's mail every time we got a restore
request trying to find the particular message(s) they deleted.  It's
easier to just restore everything and tell the user, "Here's everything we
have.  Find what you deleted and copy it back to where you want it."


Dave McMurtrie, Systems Programmer
University of Pittsburgh
Computing Services and Systems Development,
Development Services -- UNIX and VMS Services
717P Cathedral of Learning

More information about the Info-cyrus mailing list