The --relative option on remote machine to source machine ???

Jignesh Shah jignesh.shah1980 at gmail.com
Sat May 2 18:55:39 GMT 2009


Sorry guys, I was using rsync 2.6.7 in "rsync -avR remote:/foo/./bar/.
/tmp/" command. In rsync v3.0.5 it works as expected.

Thanks,
Jignesh

On Sun, May 3, 2009 at 12:07 AM, Jignesh Shah <jignesh.shah1980 at gmail.com>wrote:

> Hi,
> I read below lines in rsync v3.0.5 for --relative option.
>
> 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
>
> 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/
> That would create /tmp/bar/baz.c on the remote machine.
>
> (note the line in blue) This says we can use relative option only from
> source to destination. Could any one tell me how could I use relative option
> from remote machine to source machine like below:
>
>  rsync -avR remote:/foo/./bar/. /tmp/
>
> I want to sync everything in /foo/bar/ on remote machine to /tmp/bar/ on
> source machine. Currently this command creates /tmp/foo/bar/ directory.
>
> Thanks,
> Jignesh
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list