-R option -> source directories from remote

View: New views
2 Messages — Rating Filter:   Alert me  

-R option -> source directories from remote

by cm-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

MessageHi Developers,

i  have a problem with syncing relative paths (-r) on remote host.

Using relative paths the local way does function perfectly, because you
are able to change the directory before synchronisation.

Example:

cd pathToRelativePaths;
rsync -R.... -e "....." localpath1/ localpath2/ user@host:/destpath

That works because you are able to switch to the directory where the
"relative paths" localpath1 localpath2 are present.

Problem:

?
rsync -R.... -e "...." user@remotehost::localpath1/ ::localpath2/ /localdestpath

In this case, i have no idea, how to switch to the "root path" on "remotehost" to
to get the "relative" direcories because I'm at the local machine. On remote I
certainly wind up on the users home directory which is not equal to the "root path".

Hint: I can not use absolute paths !

Does anyone have an idea how to "change" to a directory on remote maschine
to use relative paths (-R) ?

Thanks for your efforts.


Best Regards

Christoph






--

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: -R option -> source directories from remote

by Wayne Davison-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 04, 2008 at 10:08:49AM +0200, christoph.m@... wrote:
> Does anyone have an idea how to "change" to a directory on remote maschine
> to use relative paths (-R) ?

Starting with 2.6.7 you can insert a dot dir into any source path to
indicate where the duplicating of directories starts:

rsync -R remotehost::mod/some/./path/1 ::mod/other/./dir/2 /dest/

See the --relative option in the manpage:

http://rsync.samba.org/ftp/rsync/rsync.html

..wayne..
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
LightInTheBox - Buy quality products at wholesale price