Recovering shared folder contents from tar.gz backup?
Andrew Morgan
morgan at orst.edu
Fri Jan 22 16:26:13 EST 2010
On Fri, 22 Jan 2010, Kővári János wrote:
> Hello everyone!
>
> Something has happened with one of my cyrus servers, which was hosting
> one shared folder (with multiple subfolders in it). I still don't know
> what has happened - most likely a mailboxes.db corruption, no idea why.
> Since this is automatically backed up every 4 hours or so, it's gone - I
> only have backups of this in an already corrupt state (assuming the
> problem was corruption of this db)
> I tried fixing things with reconstruct, but it didn't help, the shared
> folder disappeared permanently, even though all the files are still in
> the storage partition.
> I have regular backups of the mail storage (simple tar.gz of the whole
> structure), so nothing is lost.
> Since all my attempts to recover the shared folder were unsuccesful, I
> decided to wipe this partition and recreate it, with the exact same
> structure, then tried copying back the data from a backup and then
> reconstruct, but this didn't help at all, the recreated shared folder
> still shows up as empty, reconstruct doesn't find the subfolders etc.
> Could someone please tell me how to get my mail back frum the backup?
> Thanks in advance!
These are the steps I follow to restore a user's deleted mail. I assume
you could modify them slightly to work on shared folders.
1. Locate user's mail directory
(/var/spool/cyrus/mail/prefix/user/username).
2. Change to that directory.
3. Make a RESTORE directory (mkdir RESTORE).
4. Fix ownership/perms (chown cyrus:mail RESTORE; chmod 700 RESTORE).
5. Change to the directory containing the mail folder the user wants
restored.
6. Run 'recover', the Legato backup client.
7. 'changetime' to change the time to recover data from.
8. 'add filename' to add the files to restore. To restore all the
messages in the folder, use 'add *.'.
9. 'relocate RESTORE' to recover files into the RESTORE directory instead
of the current directory.
10. 'recover' to recover the files.
11. 'quit' to quit out of the recover program.
12. Create a dummy cyrus.header file "(touch RESTORE/cyrus.header; chown
cyrus:mail RESTORE/cyrus.header; chmod 600 RESTORE/cyrus.header).
13. Run "su cyrus -c '/usr/local/cyrus/bin/reconstruct -x -f
user.username'".
14. Run "su cyrus -c '/usr/local/cyrus/bin/quota -f user.username'".
Andy
More information about the Info-cyrus
mailing list