[sclug] Spotting errors in a scheduled rsync job

Keith Edmunds kae at midnighthax.com
Fri Jun 8 23:12:23 UTC 2007


Hi Tom

> However, I want to make it easy to spot problems.

Run the command like this:

rsync --options-you-need FROM TO && touch /var/tmp/backup.ok

The part after the "&&" will only execute if the previous command runs
without errors. So, each day, all you need to do is check the date/time
of /var/tmp/backup.ok to see if it ran OK. Taking this one step further:

touch /var/tmp/backup.starting && rsync .... &&
rm /var/tmp/backup.starting && touch /var/tmp/backup.ok

Just an idea: you can make it as complex or as simple as you like.

Keith



More information about the Sclug mailing list