Fix for batch mode (was Re: batch mode maintainability)
dwd at bell-labs.com
Sat Feb 2 07:59:50 EST 2002
On Fri, Feb 01, 2002 at 11:23:33AM -0800, Jos Backus wrote:
> Thanks Dave for your comments, I have incorporated your feedback in the patch
> below. Please review.
> On Fri, Feb 01, 2002 at 09:49:07AM -0600, Dave Dykstra wrote:
> > Hmm, I wonder if it would be easy to use rsync's compression library to
> > compress the whole flist, csum, and delta files on the fly. That would
> > certainly be more convenient.
> Yes it would. Any ideas on how to go about this? I'm still (re)reading the
> rsync papers to ge a better idea of the program's code structure.
I'm not familiar with that area of the code, but I assume it would be
Another idea just occurred to me: it would be nice to be able to stream all
the batch files over the network rather than storing them temporarily on a
disk, especially on the destinations during a --read-batch operation. That
could significantly decrease both total elapsed time and disk space usage.
I think this could even be done with an external program that creates 3
named pipes or unix-domain sockets on each side and multiplexes the three
channels together, but it might be better if it were built in.
> +Batch mode can be used to apply the same set of updates to many
> +identical systems\&. Suppose one has a tree which is replicated on a
> +number of hosts\&. Now suppose some changes have been made to this
> +source tree and those changes need to be propagated to the other
> +hosts\&. In order to do this using batch mode, rsync is run with the
> +write-batch option to apply the changes made to the source tree to one
> +of the destination trees\&. The write-batch option causes the rsync
> +client to store the information needed to repeat this operation against
> +other destination trees in a batch update fileset (see below)\&. The
> +filename of each file in the fileset starts with a prefix specified by
> +the user as an argument to the write-batch option\&. This fileset is
> +then copied to each remote host, where rsync is run with the read-batch
> +option, again specifying the same prefix, and the destination tree\&.
> +Rsync updates the destination tree using the information stored in the
> +batch update fileset\&.
> +The .rsync_argvs file contains a command-line suitable for updating a
> +source tree using that batch update fileset\&. It can be executed using
> +a Bourne(-like) shell, optionally passing in an alternate source tree
change "source" to "destination"
> +pathname\& which is then used instead of the original path\&. This is
> +useful when the source tree path differs from the original source tree
again change "source" to "destination" (twice)
> +.IP o
> +The rsync version used on all destinations should be identical to to the
change "to to" to "to"
- Dave Dykstra
More information about the rsync