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.
Tags: backup, cron, mail, rsync, system administration, work



You should check out mrb