add inverse recursive feature or do a mkdir -p/install -D -d ?

Wayne Davison wayned at samba.org
Wed Jun 6 15:54:44 GMT 2007


On Wed, Jun 06, 2007 at 12:31:39PM +0200, Infomaniak Network SA / Guy Baconniere wrote:
> $ rsync -av test1/toto1/toto2/toto3/toto4 test2/toto1/toto2/toto3/toto4
> building file list ... done
> rsync: mkdir "/home/baco/test2/toto1/toto2/toto3/toto4" failed: No such
> file or directory (2)

You can use --relative (-R) to send the path info as part of the
sync:

  rsync -avR test1/./toto1/toto2/toto3/toto4 test2/

or

  cd test1
  rsync -avR toto1/toto2/toto3/toto4 ../test2/

The "/./" idiom in the first example was added in rsync 2.6.7, and
indicates the cut-off point between directories that are outside
the transfer, and those that are included in the transfer.

..wayne..


More information about the rsync mailing list