Reconstruct options for restoring mailbox?

Andrew Morgan morgan at orst.edu
Tue Apr 18 15:47:54 EDT 2006


On Tue, 18 Apr 2006, Rosenbaum, Larry M. wrote:

> Using Cyrus IMAP 2.3.3 on Solaris 9.
>
> Let's say I'm restoring a subfolder "test" of a mailbox "user.me", and
> all I have are the message files.  So here is what the user/me directory
> looks like:
>
> -rw-------   1 cyrus    mail        3145 Dec 29 16:02 1.
> -rw-------   2 cyrus    mail        3133 Dec 29 16:03 2.
> -rw-------   1 cyrus    mail         682 Jan 13 12:38 3.
> -rw-------   1 cyrus    mail         688 Jan 13 12:54 4.
> -rw-------   1 cyrus    mail         526 Feb 14 10:00 5.
> -rw-------   1 cyrus    mail         546 Feb 15 12:38 6.
> -rw-------   1 cyrus    mail         672 Feb 27 14:35 7.
> -rw-------   1 cyrus    mail        6044 Apr 12 16:44 cyrus.cache
> -rw-------   1 cyrus    mail         157 Apr 12 16:44 cyrus.header
> -rw-------   1 cyrus    mail         580 Apr 12 16:44 cyrus.index
> drwx------   2 cyrus    mail         512 Apr 12 16:41 test
>
> and here is what the user/me/test directory looks like:
>
> -rw-------   1 cyrus    mail       94558 Mar 14 16:22 2.
>
> I need to somehow generate the cyrus.* files in the test subdirectory
> and add it to the mailbox database.  What reconstruct command will do
> that?  In the old days, a "reconstruct -m" and "reconstruct
> user.me.test" would do the job (with a large overhead for the -m
> command), but -m is no longer functional.  The -x and -f options look
> hopeful, but they won't add the mailbox to the database unless the
> cyrus.* files are present.  And "reconstruct user.me.test" or
> "reconstruct -r user.me" won't create the cyrus.* files because the
> mailbox is not in the mailbox database.  What is the best way to handle
> this?

When I restore a folder from backups, I usually restore all the message 
files, plus the cyrus.header file.  Then I run reconstruct -f on the 
mailbox.

If you don't have the cyrus.header file for user/me/test, I think you have 
2 options:

1.  Copy the cyrus.header file from the parent mailbox (user/me) and run 
reconstruct -f.

2.  Create the folder first using cyradm, then copy the message file into 
it and run reconstruct -f.


 	Andy


More information about the Info-cyrus mailing list