October 04, 2006 7:53 PM

rsnapshot

In my never ending quest for ever better tweaks I've managed to get 'rsnapshot' to work even better for me. Put the following in your crontab file;- 0 */6 * * * /usr/bin/rsnapshot hourly
00 23 * * * /usr/bin/rsnapshot daily
40 23 * * 0 /usr/bin/rsnapshot weekly
20 23 1 * * /usr/bin/rsnapshot monthly
55 0,6,12,18 * * * DATE=`date` UPTIME=`uptime` ; echo "$DATE, $UPTIME" >>/opt/logwatch/rsnapshot.txt ; /usr/bin/rsnapshot du >>/opt/logwatch/rsnapshot.txt The first line fires it off every six hours to do a full backup, the second line changes the earliest hourly snapshot to be the daily snapshot. The third line changes the earliest daily snapshot to be a weekly snapshot only if it occurs on a Sunday. The fourth line makes the daily snapshot be the monthly snapshot but only if it is the first of the month. And the fifth line writes the date and machine uptime to a separate file 55 minutes after the six hourly backups, and also tells you how much disc space all the backups take. It all works, but takes longer to explain. Why not try my crontab incantation and try out rsnapshot for yourself? -----

Posted by Sharon | Permalink