[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cyrus mailbox restore

Did you backup both ?? Or just your mailboxes ?
Only the mailboxes, I only discovered the control stuff later.

I discoverd that if I created the folders I had, then delete the stuff in /var/spool/imap, restore the old mailbox and run reconstruct, it picks up the folders with the mail in. So that's what I'll have to do, but there were a *LOT* of folders.

The mailboxes.db file is a binary file. What is it generated from, and what does the context look like? This seems like my last option.

The type of file depends on how you compiled cyrus and what db backend its linked against. It could be a skiplist it could be a db v3 file, or db v4 file.

reconstruct with -r and -f options will rebuild your mailboxes db file.

It also rebuilds the per mailbox db files needed in each user mailbox and all sub folders. Essentially it recreates all the indexes from your raw stored mail fails and folder paths.

So I think you are going to have to do that.

I would also suggest running something once a nite to generate a text dump of your mailboxes db file, which you can then use to recreate the db file if it gets corrupted.

Its not race condition safe, but it should give you the idea :)

my $outfile = '/var/imap/mbox_' . $todays_date_in_iso_format . '.txt';

my $cmd = qq{/usr/bin/sudo -u cyrus /usr/cyrus/bin/ctl_mboxlist -d > $outfile};

print qq{cmd: $cmd\nresults: },qx{$cmd};


To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: