[Dovecot] backup & restore mailbox files manually
Hi ALL...
Am working on a solution to backup maildir mailboxes using rsync. All mailbox directories are mirrored on another machine.
I need advise regarding restore of the INBOX & SENT files from the backup.
For e.g , [1] Can I just copy "file-x-y-z" from /Maildir/cur to restore it on /Maildir/cur on the mailserver. [2] Can I do same for SENT emails ?
Thanks CoolAtt
View this message in context: http://old.nabble.com/backup---restore-mailbox-files-manually-tp27303434p273... Sent from the Dovecot mailing list archive at Nabble.com.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 25 Jan 2010, coolatt wrote:
Am working on a solution to backup maildir mailboxes using rsync. All mailbox directories are mirrored on another machine.
I need advise regarding restore of the INBOX & SENT files from the backup.
For e.g , [1] Can I just copy "file-x-y-z" from /Maildir/cur to restore it on /Maildir/cur on the mailserver. [2] Can I do same for SENT emails ?
You can do so. But it can lead to duplicate mail, because the filename is not static, e.g. message status or keyword changes are reflected there.
There had been a thread lastly about this topic (well, a minor bit differently); I restore the mails to a completely different folder and let the user pick the messages and re-file them into specific mailfolders.
Others suggested to use a script to verify filename stem (before the colon), e.g. restore to tmp/, then check new/ and cur/, if there exists a file with the same stem. However, there had been said that there is a possible race condition, if the message flags are changed simultaneously.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS12ub7+Vh58GPL/cAQIiFggAsbf34qad697fbVHlAZ5VmuUaurKzc9hk 8zAqtP4zc2Tu8U9ZtMwNg1Sxw7ikYxdU5kz4JmbICVoaK4fnauXv41DZlBwgnWEw XgFa6CiIsuVKRxgB8FeWO6X63oijOMhoqF3dJDET+RzTLiCZkj47zZaA/0JYFOYu BV/rGfmWqT2zDdHYHI8cMjzyPzuwnYbRBDjUdScNwH35BZOKykI4/EyMmmUdfiIO EqPlj0sSSCRroBztRoQMVyIoTkL5MV3hGDRgWKP1yc0YT9SLlzjQXY0TylumNHXH nEjjDozOfwq7E7TrBsct68OPXMfBUB0IQ/JbHtGlhhwh6B6p8qqgxQ== =xC+M -----END PGP SIGNATURE-----
When I delete the mail file from /Maildir/cur and restore it from the backup , I cannot see the body of the email when I view it (only the subject appears)
I restored only a single mail file using scp: scp root@backup-host:/backup/vmail/coolatt/Maildir/cur/1264489757.P14232Q0M667471.ecs,S=628:2,S /home/vmail/coolatt/Maildir/cur/
Please help me.
Thanks CoolAtt
Date: Mon, 25 Jan 2010 15:45:00 +0100 From: skdovecot@smail.inf.fh-brs.de To: dovecot@dovecot.org Subject: Re: [Dovecot] backup & restore mailbox files manually
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 25 Jan 2010, coolatt wrote:
Am working on a solution to backup maildir mailboxes using rsync. All mailbox directories are mirrored on another machine.
I need advise regarding restore of the INBOX & SENT files from the backup.
For e.g , [1] Can I just copy "file-x-y-z" from /Maildir/cur to restore it on /Maildir/cur on the mailserver. [2] Can I do same for SENT emails ?
You can do so. But it can lead to duplicate mail, because the filename is not static, e.g. message status or keyword changes are reflected there.
There had been a thread lastly about this topic (well, a minor bit differently); I restore the mails to a completely different folder and let the user pick the messages and re-file them into specific mailfolders.
Others suggested to use a script to verify filename stem (before the colon), e.g. restore to tmp/, then check new/ and cur/, if there exists a file with the same stem. However, there had been said that there is a possible race condition, if the message flags are changed simultaneously.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS12ub7+Vh58GPL/cAQIiFggAsbf34qad697fbVHlAZ5VmuUaurKzc9hk 8zAqtP4zc2Tu8U9ZtMwNg1Sxw7ikYxdU5kz4JmbICVoaK4fnauXv41DZlBwgnWEw XgFa6CiIsuVKRxgB8FeWO6X63oijOMhoqF3dJDET+RzTLiCZkj47zZaA/0JYFOYu BV/rGfmWqT2zDdHYHI8cMjzyPzuwnYbRBDjUdScNwH35BZOKykI4/EyMmmUdfiIO EqPlj0sSSCRroBztRoQMVyIoTkL5MV3hGDRgWKP1yc0YT9SLlzjQXY0TylumNHXH nEjjDozOfwq7E7TrBsct68OPXMfBUB0IQ/JbHtGlhhwh6B6p8qqgxQ== =xC+M -----END PGP SIGNATURE-----
Windows Live: Keep your friends up to date with what you do online. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/soc...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 26 Jan 2010, CoolAtt NNA wrote:
When I delete the mail file from /Maildir/cur and restore it from the backup , I cannot see the body of the email when I view it (only the subject appears)
I restored only a single mail file using scp: scp root@backup-host:/backup/vmail/coolatt/Maildir/cur/1264489757.P14232Q0M667471.ecs,S=628:2,S /home/vmail/coolatt/Maildir/cur/
first try to reindex or cache the locally cached information about the mails.
If this does not help, try to change the stem of filename (before colon).
I do not have a caching MUA and never (well, I did not often restored messages directly into the original mailbox) had a problem like that.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS17r37+Vh58GPL/cAQIp6AgAxCP5Vtok1NOufmIeWPMtp/DER3Ct9Sza kQwXxdrdVMvgOCpDeSGs0mAv6kv7+QrBCJ9a8mkmjJARK4mrst/o+OlMRm6mZzSL 9NtrFLDzuTjF1znWR0nEF/5JRiJtsD5a/yz3WmDb42vlJO4u26Pe3TL39oNHJRWN PcjMi4SN9w/sJJKJGJPD2H+dizqj2Ns3qbwyXzV5O92LHBrzD9gOGQ16jbOQotbH CyvuHGfTG0gefuc4SVPO1hMZwdgm2u+11N4jpmoDRontaMq0ghTp7qpdFcTRp/vr Crv47PrzWcgUM0UiLkWWOXA23dAjHzVUCF4be2CaVYtDSAQztk3MRg== =o8Hi -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 26 Jan 2010, Steffen Kaiser wrote:
first try to reindex or cache the locally cached information about the mails.
Er, this sentence should read:
first try to reindex or delete the locally cached information about the mails in the MUA.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBS17t8b+Vh58GPL/cAQIkPQgAvKUqunEIs/wUbrw/M4BAIEgVnoCceS+j DTDRvARbMRxRxj1cD5yrJ1bKz9XwUOQ9mv8AJjs0yulcGmPt5bSkIbhLzpKNbeXj jtEzG2AWjA0W7geUmcWeqIb+MMbKtlxW1qUST64lSOz+7mN6Uf5N3jy2kjAoiYJv /vaPo/J5I9fXqEMLhiEstp+1fLsJ6Cws1x3LH2XsR8WJ3CoTHUuPCVfGhuitq+Lp GFORHkMh66H1JcHcVWCJBHEOq7BKSXaJH76Hq0mhztfJtbxGKQ5UcrJw91NMYb53 sD19tAH+sUv7awhWPzXkjJOokwc2kjal+dHmTdLhOVkW5LZAiIkcTg== =iKeg -----END PGP SIGNATURE-----
participants (3)
-
coolatt
-
CoolAtt NNA
-
Steffen Kaiser