Injecting a mail folder into a users inbox/restore from backup

Marc Patermann hans.moser at ofd-z.niedersachsen.de
Wed Dec 5 06:06:28 EST 2012


Lars,

Lars Schimmer schrieb (05.12.2012 11:47 Uhr):

> Aas I never needed to do it yet, I want to ask for the best way to
> restore users email which got lost...
best is to try before you need it! ;)

> Situation: running cyrus on debian with users and mailboxes.
> User deleted on accident a folder in his INBOX (and cyrus did unlinked
> the files and removed the folder from disk already).
> I do backup from the INBOX structures on disk every night (in a basic
> simple way, see it as a snapshot of the mail disks of cyrus).
> 
> Now I need a good way to inject the "old" folder user.xyz.INBOX.Folder
> into the live cyrus system.
> Is it easier to create a new user and copy with imap client?
> Or just copy the folder content into a new created folder on users inbox?
Just copy back the file to the uses mailspool. Since mails are numbered 
in ascending order no file may be overwriten. Check for ownership and 
rights!
Reconstruct the mailbox with "-rf".
reconstruct should discover the now new mailboxes (if you restore whole 
folders), if not you may create them with cyradm.
Sometime we create a new mailbox - like user.foo.restore - where we 
restore the file, so the user see what was restored and can move it to 
the place he wants it himself.

Marc


More information about the Info-cyrus mailing list