Bug 4023 - Rsync does not copy files recursively when using ssh public key authorization and the files-from option
Summary: Rsync does not copy files recursively when using ssh public key authorization...
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.8
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2006-08-16 15:15 UTC by Steve Whitehouse
Modified: 2006-08-18 19:23 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Steve Whitehouse 2006-08-16 15:15:26 UTC
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" user@host.domain.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.
Comment 1 Steve Whitehouse 2006-08-16 15:40:43 UTC
Adding a -r to the command enables recursive functionality.
The -r was not necessary for recursivity however without the public key. Strange behavior.
Comment 2 Matt McCutchen 2006-08-18 19:23:24 UTC
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.