restore from cyrdump

Adam Tauno Williams awilliam at
Wed Dec 17 17:08:25 EST 2014

On Tue, 2014-12-16 at 16:58 -0600, Patrick Goetz wrote: 
> On 12/16/2014 01:42 PM, Andrew Morgan wrote:
> > I forgot about one additional thing we do - we dump the mailboxes.db to
> > a flat file once an hour via cron.  That would allow us to (mostly)
> > recover from a corrupted mailboxes.db file.  Just like a full restore,
> > we would need to run a reconstruct on every mailbox, I think.
> I thought the whole point of reconstruct was to rebuild mailboxes.db, 
> but then I took another look at the reconstruct man page and noticed:
>           Rebuild the mailboxes file. Use whatever data in the
>           existing  mailboxes file it can scavenge, then scans
>           all partitions listed in the imapd.conf(5) file for
>           additional mailboxes.
> now it's no longer clear to me what reconstruct does.  I guess rebuild 
> the {configdir}/user/<prefix>/<username>/cyrus.* files?

Yes.  If one restores message files to a mailbox folder then reconstruct
will add them back in as messages.  I have had to do this in the past -
but now with delayed expunge... I cannot remember the last time I needed
to use it.

It was more commonly used back when Cyrus IMAPd was somewhat less
awesome than it is now.  As of 2.4.x I've used the dumps primarily just
as (a) paranoia and (b) change auditing.  I have put back annotions and
some other small stuff by looking at dumps.  I doubt it has much role in
a full-restore unless you are trying to recover from corruption [which I
have experienced in the past due to a crappy EMC storage controller, not

Adam Tauno Williams <mailto:awilliam at> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA

More information about the Info-cyrus mailing list