Bug 12472 - invalid rsync-command syntax or options with —stats
Summary: invalid rsync-command syntax or options with —stats
Status: RESOLVED WORKSFORME
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.2
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-16 13:43 UTC by RutleCorps
Modified: 2020-07-26 09:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RutleCorps 2016-12-16 13:43:12 UTC
Client version 3.1.2
Server version 3.0.9
When using rsync 3.1.2 gives the error:
  /usr/local/s3rsync/prod-ssh-rsync3: invalid rsync-command syntax or options
By removing options, I was able to track the problem to the —stats flag.
It would be useful if the error message could report that —stats was the cause of the error.
Comment 1 Paul Slootman 2016-12-16 14:37:23 UTC
Did you cut&paste the --stats from some webpage? As you can see from the emailed version of your report:

Summary: invalid rsync-command syntax or options with â\200\224stats

There's your problem! You're not using the ASCII '-' sign, you're using some UTF8 abomination that represents a dash only to humans.
Comment 2 RutleCorps 2016-12-16 14:48:34 UTC
(In reply to Paul Slootman from comment #1)

For the bug reporter, not in my rsync command.
(My rsync command is the same script that I used w/o error with 3.0.9)
I think the error has something to do with what's mentioned in the 3.1.2 man page re: "—info=FLAGS"
Comment 3 RutleCorps 2016-12-16 15:21:47 UTC
(In reply to Paul Slootman from comment #1)

Also, no error when the server side is 3.1.2, only when the server side is 3.0.9
Comment 4 Wayne Davison 2020-07-26 09:42:49 UTC
I think you're alluding to lost daemon syntax errors, which was something that got fixed in a 3.2.x version.  The parser always complains about the specific option that is wrong, but it will complain about something with bogus (non) dashes as though it were a local file arg, so rsync is probably telling you that your remote and local args are conflicting (since what you think is an option is a local file arg).