How to mirror relative-path ?

3 posts / 0 new
Last post
Erwin
Offline
Last seen: 14 years 10 months ago
Joined: 01.05.2008 - 21:33
How to mirror relative-path ?

Hi,
I would like to reproduce the relative-path from Source to Destination when syncing some dirs.
This seems possible with -R.
However -R also reproduces the /cygwin/-part that is needed to support local drivers in Windows.
How can I achieve this without creating this \cygwin\ on my Destination?

Thanks,

Erwin

itefix
Offline
Last seen: 1 hour 11 sec ago
Joined: 01.05.2008 - 21:33
Re: How to mirror relative-path ?

cd /cygdrive/c
rsync -R -av your-directory-to-be-rynced remote::tmp

???

Erwin
Offline
Last seen: 14 years 10 months ago
Joined: 01.05.2008 - 21:33
Re: How to mirror relative-path ?

Aha, first a change-dir and then rsync without referencing to /cygdrive/c. That might work.
I found a solution by using --files-from=FILE. With this one the dirs will be replicated only to the level as specified in FILE. Like:

rsync -rav --files-from=/cygdrive/c/file.txt /cygdrive/c remote::tmp

With file.txt containing: /my-path-to-be-replicated

Thanks,

Erwin

Release news