Option to create ancestors of destination, like "mkdir -p

Wayne Davison wayned at samba.org
Wed Dec 16 15:30:04 MST 2009

On Wed, Dec 16, 2009 at 1:38 PM, Tony Abernethy <tony at servasoftware.com>wrote:

> The existing default has saved my bacon several times.

Yeah.  I don't think I'd ever change the default, though adding an option is
possible.  However, there are several ways to create paths remotely with
rsync now.  For example:

mkdir -p /var/tmp/backup.$$/please/create/this/path
rsync -aivR /var/tmp/backup.$$/./please/create/this/path host:/dest/
rm -rf /var/tmp/backup.$$
rsync -aiv /src/ host:/dest/please/create/this/path/

But, admittedly, that would be a good deal easier like this (picking an
option out of thin air):

rsync -aiv --create-dest-dirs /src/ host:/dest/please/create/this/path/

Something like that does seem fairly useful to me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20091216/00ffea68/attachment.html>

More information about the rsync mailing list