Mail backup with rsync and cron

Quick and dirty crontab, but ’tis good enough I suppose?

0 1-23 * * * rsync -avP /srv/mail/ /backup/auto/mail/hourly/
0 0 * * * rsync -avP --del /srv/mail/ /backup/auto/mail/hourly/
@daily rsync -avP --del /srv/mail/ /backup/auto/mail/daily/
@weekly rsync -avP --del /srv/mail/ /backup/auto/mail/weekly/
@monthly rsync -avP --del /srv/mail/ /backup/auto/mail/monthly/

Further on, /backup will be nfs-mounted over OpenVPN or similar. Currently offline-backup is done once a week over the internets to two separate locations.

Database is on a separate system and handled there in a similar fashion. Reports are automatically mailed through crontab’s output catcher.

However I’m still pondering how to do /etc neatly. I’m guessing filelist argument to rsync with the stuff that just have to be replaced. Configurations are rather identical between Debian/Ubuntu machines at least.

This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

One Response to Mail backup with rsync and cron

  1. Zash says:

    You should check out mrb

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>