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

L.M.J linuxmasterjedi at free.fr
Sat Jan 30 08:49:08 EET 2010


Le Thu, 28 Jan 2010 13:07:32 +0500,
CoolAtt NNA <coolatt at live.com> a écrit :

> 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.

I'm going to share what I've did. This is not rocket science but enough for my SOHO needs.
Each user mail boxes are stored in ~HOME/mail/
 
# cat /opt/crontab-scripts/rsync-local-email-backup.sh
  [...]
  for i in /home/*/mail/
    rsync -a --delete $i ${PATHTOSAFEPLACE}/$(date +%u)/${i}/
    RETURNCODE=$?
    [...]
  done
  [...]

In clear, each day, I copy all mailboxes to a different (date +%u -> 0 to 6) safe sub-directory. 
I admit, it's very simple but enough for my needs and certainly could be improved..


 Best regards,

-- 
 LMJ
 "May the source be with you my young padawan"
 http://sites.google.com/site/imatruelinuxmasterjedi/


More information about the dovecot mailing list