ssh & keep absolute local paths from --include-from=file remotely

Thomas Otto 3.1415926535897932384626433832 at gmx.net
Mon Nov 10 11:58:07 EST 2003


Hi!

I am trying to do a IMHO rather trivial thing with rsync via ssh:

I have some files under /etc and some under /home/thomas, I want to 
rsync just these to a remote PC with a similar setup where they should 
end up in the same dirs, and this with a single rsync call. Bascially 
'tar --files-from FILE -cf - | netcat' and 'cd /; netcat | tar -xf -' 
with the optimisation rsync and the security ssh provides.

I went up to doing fancy stuff like

rsync -av -e ssh --include  '*/' --exclude '*' --include-from=file / 
thomas at 10.10.164.170:/

(file containing \n seperated /etc/bash.bashrc /etc/profile 
/home/thomas/testfile)

..yet no success. rsync ends up either stating all files recursivly so i 
^C or it just tries to dump them all into / (where I don't have write 
access).

So all I want is rsyncing files while preserving their _absolute_ paths 
on the target machine which doesn't seem possible. Can someone point me 
to a patch or so? If not consider this as a feature request :)

TIA

    -Thomas


P.S.: Please no "hacks" like hardlinking the /etc/ files to a subdir and 
just rsyncing this subtree or a 'for i in `cat Datei`
do rsync $i foo at bar:${i%\/*} ... ', since this is via ssh and even with 
a keyfile the connection would have to be re-established everytime.




More information about the rsync mailing list