Dear Maintainer,
I am trying to rsync individually named multiple files using the rsync daemon.
In the ADVANCED USAGE section, the manual page says
The syntax for requesting multiple files from a remote host is done by
specifying additional remote-host args in the same style as the first,
or with the hostname omitted. For instance, all these work:
rsync -av host:file1 :file2 host:file{3,4} /dest/
rsync -av host::modname/file{1,2} host::modname/file3 /dest/
rsync -av host::modname/file1 ::modname/file{3,4}
Older versions of rsync required using quoted spaces in the SRC, like these examples:
rsync -av host:’dir1/file1 dir2/file2’ /dest
rsync host::’modname/dir1/file1 modname/dir2/file2’ /dest
I created a test file tree using
mkdir /home/rsync-test
mkdir /home/rsync-test/conf
mkdir /home/rsync-test/files
mkdir /home/rsync-test/files/a
mkdir /home/rsync-test/files/b
echo "file x" > /home/rsync-test/files/a/x
echo "file y" > /home/rsync-test/files/b/y
echo "file z" > /home/rsync-test/files/b/z
and then run
/usr/bin/rsync --daemon --config=/home/rsync-test/conf/rsyncd.conf --address=127.0.0.1
using this rsyncd.conf:
------------------------------------------------------
use chroot = yes
[a]
comment = a folder
path = /home/rsync-test/files/a
[b]
comment = b folder
path = /home/rsync-test/files/b
------------------------------------------------------
The command
rsync 127.0.0.1::b/y ::b/z .
runs as expected, synchronizing files y and z with no errors. However, a problem appears when the files are located in different modules:
rsync 127.0.0.1::b/y ::a/x .
fails with
rsync: change_dir "/a" (in b) failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1677) [generator=3.1.3]
y has been synchronized, but x was not. The situation remains the same when the host is explicitly added to the second argument. Similarly, adding the quotes (old style syntax) does not help.
Possibly I am misunderstanding something; this behaviour baffles me.
Thanks for the attention
Furio