Si, comunque sorvoliamo su questo punto e andiamo avanti.
giusto dando una letta molto molto veloce alla pagina
man (e non approfondendo oltre l'uso del comando)
con riferimento al tuo comando
Codice: Seleziona tutto
rsync -nav --relative 146.32.3.3:/volume1/./public/ .
il path
è un path assoluto. Per essere relativo dovrebbe essere scritto come
-R, --relative
Use relative paths. This means that the full path names specified on the command line are sent to the server
rather than just the last parts of the filenames. This is particularly useful when you want to send several dif‐
ferent directories at the same time. For example, if you used this command:
rsync -av /foo/bar/baz.c remote:/tmp/
... this would create a file named baz.c in /tmp/ on the remote machine. If instead you used
rsync -avR /foo/bar/baz.c remote:/tmp/
then a file named /tmp/foo/bar/baz.c would be created on the remote machine, preserving its full path. These
extra path elements are called "implied directories" (i.e. the "foo" and the "foo/bar" directories in the above
example).
Beginning with rsync 3.0.0, rsync always sends these implied directories as real directories in the file list,
even if a path element is really a symlink on the sending side. This prevents some really unexpected behaviors
when copying the full path of a file that you didn’t realize had a symlink in its path. If you want to duplicate
a server-side symlink, include both the symlink via its path, and referent directory via its real path. If
you’re dealing with an older rsync on the sending side, you may need to use the --no-implied-dirs option.
It is also possible to limit the amount of path information that is sent as implied directories for each path you
specify. With a modern rsync on the sending side (beginning with 2.6.7), you can insert a dot and a slash into
the source path, like this:
rsync -avR /foo/./bar/baz.c remote:/tmp/
Infatti
Codice: Seleziona tutto
rsync -av --relative /home/io/./plugins/mysoft/logging/ nas:/volume1/repositories/
Funziona!!!!
Però
Codice: Seleziona tutto
rsync -av --relative nas:/volume1/repositories/./plugins/mysoft/logging/ /home/io/
non funziona.
receiving incremental file list
ERROR: module is write only
rsync error: syntax or usage error (code 1) at main.c(782) [sender=3.0.9]
rsync: connection unexpectedly closed (110 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]