X-Status flag, reconstruct and a suggestion

Andrew Morgan morgan at orst.edu
Sat Oct 4 12:50:06 EDT 2003



On Sat, 4 Oct 2003, Rob Siemborski wrote:

> On Sat, 4 Oct 2003, Andrew Morgan wrote:
>
> > Where are the status flags currently stored in Cyrus?  The cyrus.index
> > file?  The cyrus.cache file?  I know the seen information is stored in a
> > separate file outside the mailbox directory.
>
> System Flags other than \Seen (and \Recent, which is only a pseudo-flag)
> are stored in the cyrus.index file.  The names of user flags are stored in
> the cyrus.header file.
>
> > In what cases would you lose the status flags of a message?
>
> You'd lose them in the following situations
>
>  * If you decided to delete the cyrus.index file
>  * Atypical filesystem corruption (that is, data that was already synced
>    on the disk becomes corrupted)
>  * A bug in cyrus's index file writing routines (let's fix Cyrus then)
>
> Cyrus goes to great lengths to do the "right thing" in the event of a
> system crash at any given point, so at most you lose the most recent
> action, but not any actions before it.

It seems like in the cases were you would have a backup of the messages,
you'd also have a backup of the index file, in which case the flags would
not be lost.  I don't see much benefit to adding an additional layer of
protection on top of this by storing a duplicate of all the flags in
another file...

On a side note, I'm wondering about doing restores of mailboxes when a
user wants to retrieve a message they deleted several days ago.
Currently, I'm doing the following:

1. Go to the user's inbox directory (/var/spool/cyrus/mail/u/user/username
here).  Make a directory "RESTORE".  Set the ownership and perms on the
directory.

2. Recover the message files and the cyrus.header file into the RESTORE
directory.

3. Run "su cyrus -c '/usr/local/cyrus/bin/reconstruct -f user.username'".

4. Run "su cyrus -c '/usr/local/cyrus/bin/quota -f user.username'".

In light of this discussion about flags, is there a better way to do the
restore so that the flags are restored as well?

	Andy





More information about the Info-cyrus mailing list