ssh & keep absolute local paths from --include-from=file
remotely
jw schultz
jw at pegasys.ws
Mon Nov 10 12:05:21 EST 2003
On Mon, Nov 10, 2003 at 01:58:07AM +0100, Thomas Otto wrote:
> 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)
It would be much simpler to just put all your patterns in
the --include-from file. _Read_ the "EXCLUDE PATTERNS"
section of the manpage.
>
> ..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 :)
Doing this is a snap, you just need to understand the
implications of the pattern matching.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list