The Samba-Bugzilla – Bug 1660
--exclude option causes rsync to fail
Last modified: 2005-04-01 11:21:14 UTC
After upgrading to rsync 2.6.3pre1 yesterday, I was no longer able to sync
successfully through SSH.
bash$ ssh -x root@host rsync --server --sender --exclude /etc -av . /
rsync: Error parsing options: option may be supported on client but not on server?
rsync error: syntax or usage error (code 1) at main.c(1064)
If I remove the --exclude option this problem goes away. Both computers are
running rsync 2.6.3pre1.
This problem does not occur if I instead do `rsync -e "ssh -l root"' instead of
first SSH'ing to the remote computer and running rsync from there. If you need
any more information please let me know.
This is because you're manually specifying the --server option. The --exclude
option is specified to the client rsync, and it sends the excludes to the server
via the socket (when necessary), so the exclude option is not supposed to be
used when running the server. Are you trying to do something tricky here?
This is the way BackupPC (using File::RsyncP) invokes the client side
of rsync. This is perl code that emulates one side of the rsync
connection, and the real rsync is used as the server side with the
I agree that using the --server option manually in this manner is subject
to change, so I can't reasonably expect backward compatibility for an
So it looks like I should update File::RsyncP to send the exclude arguments
through the socket instead of arglist. Up until 2.6.2 the arglist method
(In reply to comment #2)
> This is the way BackupPC (using File::RsyncP) invokes the client side
> of rsync.
OK. My earlier choice to get rid of the server-side support for these options
was because the --include-from/--exclude-from options needed little more
security and I didn't know that some non-standard setup was using them. I've
changed the code to allow them again, and added the extra security check needed.
That's really great. It's definitely above and beyond the call of
duty to provide backward compatibility for undocumented/unsupported
I really appreciate your efforts.
I will still go ahead and provide correct support for excludes via
the socket interface, but decoupling this from the 2.6.3 release is
a huge help.