On Sun 31 May 2020, furio wrote: > > 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.
When using modules, rsync makes a connection to the daemon, and requests connection to that module. That module specifies a path that is the root of the transfer, and may also specify exclusions, user and group IDs, and all sorts of extra settings e.g. lock file, syslog facility, read only, etc. . It is way too complicated to be able to switch modules on the fly during one connection, so the specification only allows one module to be used with an rsync daemon per connection. You can see that it assumes that "::a/x" means the file "a/x" in the module already specified: "b", hence the error "change_dir "/a" (in b) failed:". There is very little chance of your usage being supported anytime, simply due to just about any option being able to be set differently per module. There is also not much advantage in combining usage of more than one module per connection, there is little overhead compared to an ssh connection. Paul