Setting up rsync to copy files remotely using ssh and a list of files using the files-from option works fine until adding public key authentication instead of requiring a password.
rsync -avzP --files-from=$RSYNCVAR --delete --ignore-errors -e "ssh -i /home/user/.ssh/id_rsa" email@example.com:/srv/www/htdocs/gwcode/files/rsync/ /opt/novell/groupwise/mail/code
The file containing the list points has two directories and a list of four files in it. The files at the root of the path copy correctly, but the files in the sub-directories do not. This works fine when the authkey is removed and a password is entered.
Adding a -r to the command enables recursive functionality.
The -r was not necessary for recursivity however without the public key. Strange behavior.
Right, the man page says that -a doesn't imply -r when --files-from is enabled.
If you can reproduce the incorrect behavior of recursing even without -r and you have rsync 2.6.8 on both machines, we should investigate further. I could not reproduce it. I set up a scenario with password authentication and the following command:
rsync -avzP --files-from=list --delete --ignore-errors localhost:tmp/src/ dest
Rsync correctly did not recurse into a directory I named in the --files-from list.