Ugh, sorry, fumbled the keys. Here is the proper message.
Hi,
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 -vnlogDtprze.is .
/backup/servers/serverA/cdrive/"
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/ \
root at remotehost:/ /backup/host/server/cdrive/
However, it sends all the directories in the /cdrive/ tree, not just
the one I'm including. Unless I specify the exact directory I want in
the authorized_keys file, the compare then fails. Is this even
possible?
Would it make any difference if I did it using an rsync server instead
of over ssh?
Thanks,
Alex