bug report

Wayne Davison wayned at users.sourceforge.net
Fri May 10 12:54:02 EST 2002

On Fri, 10 May 2002, terrell Larson wrote:
> If rsync is directed to copy a directory tree into another machine and
> the target directory does not exist then rsync will not create the
> required path

Dave Dykstra just recently responded to another user that this is the
intended behavior of rsync.  It will create one level of new directory
in the destination, but no more.  You could make the command you cited
above work by specifying "etc" rather than "etc/":

rsync -av --progress -e "ssh -1" /etc $1:/altsync/$HOSTNAME

This will create the $HOSTNAME dir, if needed, but you can't use
anything deeper than one directory in the source path.

The other way to go is to use the --relative option:

rsync -avP --relative -e "ssh -1" /any/path/at/all $1:/altsync/$HOSTNAME

This will create the $HOSTNAME dir and all the /any/path/at/all dirs, as

> The [option-specifying form] of the -e option is not documented.
> IMHO it should be.

I agree.  I've whipped up the following patch for rsync.yo, which I
will commit to CVS in a moment:

Index: rsync.yo
--- rsync.yo	2002/05/09 21:44:46	1.99
+++ rsync.yo	2002/05/10 19:47:05
@@ -515,6 +515,13 @@
 remote copies of rsync. Typically, rsync is configured to use rsh by
 default, but you may prefer to use ssh because of its high security.
+Feel free to include options in the COMMAND.  For instance:
+quote(-e "ssh -1 -l joe")
+(Note that ssh users can alternately store off site-specific connect
+options in their .ssh/config file.)
 You can also choose the remote shell program using the RSYNC_RSH
 environment variable.


More information about the rsync mailing list