[Dovecot] Anyone successfully setup Continous Backup of mailboxes using rsync ?

Stephen Usher Stephen.Usher at earth.ox.ac.uk
Wed Feb 10 15:57:34 EET 2010


CoolAtt NNA wrote:
> Hi All..
> 
> Am working on continous backup of mailboxes using rsync(for e.g by running rsync every 2 min)
> 
> Things gets more complicated when users create Subfolders in INBOX , SENT , etc..
> 
> If anyone among you did that plz guide & advise.

We have a slightly different method of doing a back-up, at least of people's 
inboxes (which is all I "archive").

I've written a program, which is run by cron once a minute, which searches for 
messages within all the users' inboxes and then hard-links them into a backup 
store elsewhere on the disk. Then, once a day a reaper process runs which checks 
for all files in that store with only one link and have not been accessed for a 
set amount of time (in our case 90 days) and then deletes those files. In other 
words, the messages are kept for 90 days after they have been deleted or moved 
out of the user's inbox.

I've attached the source code tar file as you or someone else may find it useful.

In your case you could rsync the back-up store instead of the user's main 
directory structure and maybe only do it once per day.

Steve
-- 
---------------------------------------------------------------------------
IT Systems Administrator,                     E-Mail:- steve at earth.ox.ac.uk
Department of Earth Sciences,                    Tel:-   +44 (0)1865 282110
University of Oxford, Parks Road, Oxford, UK.    Fax:-   +44 (0)1865 272072
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backupinboxes.tar.gz
Type: application/x-gzip
Size: 14335 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20100210/aeb370e0/attachment-0001.gz 


More information about the dovecot mailing list