I have a user who accidentially deleted a large number of emails prior to a certain date. He wants them back. I do have a tarfile backup of these messages. Is there a good way to restore them? Can I simply restore them to the appropriate Maildir directory and dovecot will just "figure it out"? Thanks, --Mark
According to a message to this list from Oli Schacher, http://www.dovecot.org/list/dovecot/2011-June/059493.html, all I need to do is copy the deleted emails to their original folder and dovecot will take care of it: On Tue Jun 7 08:43:54 EEST 2011 Oli Schacher wrote:>> OK, but if I want to restore a particular mail from backups, what're >> the steps involved? What I mean is do I just copy and paste that mail >> file from backups to the user account maildir folder and what program >> should I run to synchronize it. > > > exactly, just copy the mail from your backup back into the users > maildir (usually into 'cur'). Make sure the permissions of the restored > file are correct. No need to synchronize anything, dovecot automatically > detects the added message.Unless someone out there advises me against doing this, I'm going to try it. I've also seen `dovadm import` as a possible suggestion, though if a simple copy works I don't see why anyone would use `dovadm import`. --Mark -----Original Message----- From: Mark Foley <mfoley at ohprs.org> Date: Thu, 12 Nov 2015 17:13:50 -0500 To: dovecot at dovecot.org Subject: How to Restore emails I have a user who accidentially deleted a large number of emails prior to a certain date. He wants them back. I do have a tarfile backup of these messages. Is there a good way to restore them? Can I simply restore them to the appropriate Maildir directory and dovecot will just "figure it out"? Thanks, --Mark
Hi, Mark Foley <mfoley at ohprs.org> (Do 12 Nov 2015 23:31:39 CET):> According to a message to this list from Oli Schacher, > http://www.dovecot.org/list/dovecot/2011-June/059493.html, all I need to do is copy the deleted > emails to their original folder and dovecot will take care of it: >?> > exactly, just copy the mail from your backup back into the users > > maildir (usually into 'cur'). Make sure the permissions of the restored > > file are correct. No need to synchronize anything, dovecot automatically > > detects the added message.About the 'cur' I'd not be too sure. If you *mv* the files there from a directory on the same filesystem, you should be fine, but if copy the files, I'd be careful. Probably you want to mimic the maildir behaviour: copy the files to tmp/ mv the files to cur/ (not sure, if new/ would be fine to, because new/ is the natural place after tmp/. I'm not sure, what this does to the message state the client sees.) Best regards from Dresden/Germany Viele Gr??e aus Dresden Heiko Schlittermann -- SCHLITTERMANN.de ---------------------------- internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --------------- key ID: F69376CE - ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ - -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20151112/617b17db/attachment.sig>