Injecting a mail folder into a users inbox/restore from backup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Aas I never needed to do it yet, I want to ask for the best way to restore users email which got lost... 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? Thank you. MfG, Lars Schimmer - -- - - TU Graz, Institut für ComputerGraphik & WissensVisualisierung Tel: +43 316 873-5405 E-Mail: l.schim...@cgv.tugraz.at Fax: +43 316 873-5402 PGP-Key-ID: 0x4A9B1723 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlC/JkoACgkQmWhuE0qbFyNrNACfRD7QalOcmmiW2SNAZt+2aVWL zVIAniytUVV294hPPfHHBJ9o+rSZDgOu =t7W7 -END PGP SIGNATURE- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/restore from backup
On Wed, 2012-12-05 at 11:47 +0100, Lars Schimmer wrote: > Hi! > Aas I never needed to do it yet, I want to ask for the best way to > restore users email which got lost... > 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? I typically just copy the message file(s) back, or in this case the folder, and run "reconstruct -r -f -k -s user.dude". Hasn't failed me yet. A more elegant way would be nice, but until there is some type of dump/restore format, moving files around is what you've got. -- Adam Tauno Williams System Administrator, OpenGroupware Developer, LPI / CNA Fingerprint 8C08 209A FBE3 C41A DD2F A270 2D17 8FA4 D95E D383 Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/restore from backup
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 Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/reconstrcut error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-12-05 12:06, Marc Patermann wrote: > 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. Thanks for all tips, but my reconstruct (2.4.12) tells me: europa.cgv.tugraz.at> reconstruct -rf user.sef usage: reconstruct [-r] mailbox europa.cgv.tugraz.at> reconstruct -r -f user.sef usage: reconstruct [-r] mailbox A simple reconstruct -r user.sef does run flawless, but does not bring back the folder. Any hints? > Marc MfG, Lars Schimmer - -- - - TU Graz, Institut für ComputerGraphik & WissensVisualisierung Tel: +43 316 873-5405 E-Mail: l.schim...@cgv.tugraz.at Fax: +43 316 873-5402 PGP-Key-ID: 0x4A9B1723 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlC/PeIACgkQmWhuE0qbFyPapQCcDSyRgS873ouc83lU9Z78Quhm dCkAnjEz+bvx+Q9iPWPeUnUJtlD+VWE1 =/Hmk -END PGP SIGNATURE- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/SOLVED
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-12-05 12:06, Marc Patermann wrote: >> 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". Ok, it did run fine. All I needed is to run in shell, not in cyradm Thank you all so far. > > Marc MfG, Lars Schimmer - -- - - TU Graz, Institut für ComputerGraphik & WissensVisualisierung Tel: +43 316 873-5405 E-Mail: l.schim...@cgv.tugraz.at Fax: +43 316 873-5402 PGP-Key-ID: 0x4A9B1723 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlC/P2oACgkQmWhuE0qbFyNXEACfSs1W8iXZb+YDaPjeJr93ad/I 8H8AnA9gic8HaploEH72n0KMdRN5p3Wm =S+Yl -END PGP SIGNATURE- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/SOLVED
On Wed, Dec 05, 2012 at 01:34:50PM +0100, Lars Schimmer wrote: > Ok, it did run fine. All I needed is to run in shell, not in cyradm > Thank you all so far. ...yes, it is a shell command. :) And pse ignore my previous message; apparently, that version did find the folder. --Janne -- Janne Peltonen PGP Key ID: 0x9CFAC88B Please consider membership of the Hospitality Club (http://www.hospitalityclub.org) Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: Injecting a mail folder into a users inbox/restore from backup
We typically create a subfolder of the user's mailbox via cyradm or IMAP commands, restore the files from the backup into this subdirectory and run reconstruct. Requires no thought. Have used this far less since the delayed expunge was introduced. Hope this helps, John Wade Oakton Community College On 12/5/2012 5:03 AM, Adam Tauno Williams wrote: > On Wed, 2012-12-05 at 11:47 +0100, Lars Schimmer wrote: >> Hi! >> Aas I never needed to do it yet, I want to ask for the best way to >> restore users email which got lost... >> 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? > I typically just copy the message file(s) back, or in this case the > folder, and run "reconstruct -r -f -k -s user.dude". Hasn't failed me > yet. > > A more elegant way would be nice, but until there is some type of > dump/restore format, moving files around is what you've got. Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus