[CentOS] rsync versioning problem

Fri Aug 3 16:28:12 UTC 2018
Warren Young <warren at etr-usa.com>

On Aug 3, 2018, at 10:17 AM, Warren Young <warren at etr-usa.com> wrote:
> It’s possible this behavior changed since I last looked at it.

It looks like the rsync version shipping with CentOS 7 will actually complain if multiple target directory levels are missing.  With only ~/tmp existing on the target machine, this command:

    $ rsync -a path/to/stuff remote-host:tmp/foo/bar


    rsync: mkdir "/home/USER/tmp/foo/bar" failed: No such file or directory (2)
    rsync error: error in file IO (code 11) at main.c(657) [Receiver=3.1.2]

I recall a confusing, softer failure mode, so perhaps they decided this would be better handled with a hard failure to avoid some end user confusion.  (And probably some support email traffic!)

The trailing slash on the source path affects the remote result once you get past this issue, but adding a slash doesn’t prevent the error in this condition.