Tarjei Huse wrote:
> PS: Some people noted that in addition to backing up the /var/imap 
> and /var/spool/imap folders, you need to export some of the .db files to 
> txt. Does anyone want to fill me out on this?? 

To export mailboxes.db to a text file:

        ctl_mboxlist -d > tempfile

To restore it later:

        ctl_mboxlist -u < tempfile

(start I-might-be-wrong section:)
The point in this is that the fine option for rebuilding the master
mailbox database from scratch (reconstruct -m) DOES NOT WORK for
some reason in Cyrus 2.0.16, even if it is on the man page.
Once you screw up the mailboxes.db (or some of the huge files under
db/*, they are part of the same database), Cyrus has lost knowledge of
your mailboxes and their ACLs. That's when you'll need the tempfile you
created above to recreate the mailbox database first.

The remaining mailbox data and their contents can be then salvaged from
the mail store with 'reconstruct -r user.*' after pulling them from
regular backups. Fixing quotas (quota -f) might also be necessary.

Cyrus uses the DB3 libraries in a transactional manner, so a backup
taken from a running system will not be enough to restore it to
a consistent state. After a crash, you can use the DB utilities
to "roll back" the events to a previous safe point in time, which is 
saved periodically (the checkpoint events in cyrus.conf you always
wondered about, but was afraid to ask...). If you want to know more,
read the gigabyte of fine documentation at www.sleepycat.com :-)

I don't know what should be done with deliver.db and its contents
(might be safe to just delete before restart?) and whether
singleinstancestore on or off affects that. Would anyone
who actually knows this stuff care to comment?

--mika

Reply via email to