Using rsync as an incremental backup

Scott Baker scott at
Thu Jun 23 16:30:07 MDT 2011

I'm using rsync to do an incremental backup of my desktop here, to a
remote server as follows:


old=$(date -d 'now - 1 week' +%Y-%m-%d)
new=$(date +%Y-%m-%d)

rsync -avP --delete --link-dest=../$dir /home/bakers
bakers at$new/

This is actually working GREAT! The only problem is that sometimes the
cronjob won't complete (internet is down, something like that). When it
tries to run the next week it does --link-dest against a dir that
doesn't exist. It happily complies and transfers EVERY file because
there is no source to hardlink from.

I'd really like rsync to exit and throw an error if the --link-dest
isn't present. I can't find anything in the man page about any fancy
--list-dest options. Am I missing it?

- Scott

More information about the rsync mailing list