batch mode and remote destination

Wayne Davison wayned at samba.org
Wed May 17 01:23:51 GMT 2006


On Tue, May 16, 2006 at 05:12:15PM -0700, kimor79 at sonic.net wrote:
> Whats the reason that using a batch file can't be used with a remote
> destination?

Because reading a batch file only involves starting a receiver process,
which modifies local files.  It's easy to run the command remotely,
however:

    cat foo | ssh remote rsync --read-batch=- /dest

Note the lack of a source arg with --read-batch since the source is the
batch.  The use of "cat" is to make it clear what machine the "foo"
batch is coming from.  You could use a local redirection instead of a
pipe, if you prefer:

    ssh remote rsync --read-batch=- /dest <foo

This has the same effect as the first command (i.e. the contents of
"foo" is sent over the socket from a local file to the remote rsync
process).

..wayne..


More information about the rsync mailing list