Adams Bros Blog


Backups Made Simple

I've had complex backup solutions in the past, which I wrote myself with rsync and bash.  I've recently got sick and tired of the issues that come up now and then with them, so I decided to keep it extremely simple. So, I decided to opt for a couple of rsync only shell scripts. I get emails every time they run, as part of cron.

So, the cronjobs look like this...

0 8-19 * * 1 /home/trenta/backup/
0 8-19 * * 2-5 /home/trenta/backup/

# /home/trenta/backup/
/usr/bin/rsync -avH --exclude-from=/home/trenta/backup/daily-excludes.txt /home/trenta/ /media/backup/trenta-home/

# /home/trenta/backup/
/usr/bin/rsync -avH --exclude-from=/home/trenta/backup/daily-excludes.txt --link-dest=/media/backup/trenta-home/ /home/trenta/ /media/backup/trenta-home-$(/bin/date +'%w')/
Filed under: Bash, Linux Leave a comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment


No trackbacks yet.