rsync over ssh with --link-dest

Alex mysqlstudent at
Wed Nov 4 18:05:01 MST 2009


I'm trying to backup a directory over ssh that is named according to
the date, such as "20091104" on the remote side, and compare it to
yesterday's backup on the local side, such as "20091103". I'm pretty
sure I understand how rsync include/exclude works, and I believe that
is the root of the problem.

In my ~/.ssh/authorized_keys file I have the key, with the leading command:

command="/usr/bin/rsync --server --sender .

Running rsync on the remote side with this key prints the directories
under cdrive/, which are the previous backups, like 20091102,
20091103, and 20091104. I can solve this problem by making the key
contain the full path to the specific date directory, but that changes
every day, so it's not very practical.

The rsync command I'd like to be able to use is this:

rsync -avze "ssh -i keyname"
--link-dest=/backup/host/server/cdrive/20091103 --include=20091104 \

More information about the rsync mailing list