batch mode maintainability

Dave Dykstra dwd at
Wed Jan 16 05:29:05 EST 2002

On Tue, Jan 15, 2002 at 08:55:24PM +1100, Martin Pool wrote:
> I'm having second thoughts about merging the rsync+ / batch mode patch
> into the main rsync release.  It adds a lot of extra paths to the
> code.  I can see it will be useful for a few people, but I'm not sure
> it's sufficiently general to justify being there.  Dave?

I'm sorry but I really haven't looked at it closely so I can't judge the
impact on the rsync code, and I haven't tried it yet.  I think Tridge would
be in a much better position to judge it's value vs. the code impact.
It's documentation in the man page is quite pathetic, I can see that.  Am I
correct in my understanding that it is supposed to allow you to generate a
file list once on a machine and push it to multiple identical or similar
target machines at lower overhead than regenerating the file list every
time?  A lot of people have asked for that.  What happens if one of the
target machines isn't exactly identical, does it still work?

I decided to play with it a little.  I applied the patch at
to get it work.  I agree that it shouldn't use the the short names -F
and -f, and those are removed with the patch.  I do not at all like the
user interface of generating the four files with a timestamp that a 
program has to guess at; it would be much better for the user interface
to be that the --write-batch passes the same value that is used for
--read-batch, and a prefix would be better than a suffix so a user can
choose a different directory to write the files into.  Here's what I
    mkdir s d1
    echo "rev 1" >f1
    echo "rev 1" >f2
    rm -f rsync_*.*
    rsync -av --write-batch s/ d1/
    rsync -av --read-batch `echo rsync_argvs.*|sed 's/.*\.//'` s/ d1/

Nothing got copied.  Isn't that supposed to work, Jos?  I tracked down the
rsync+paper (after some trouble guessing at values for broken hyperlinks)
and an example in there said you're supposed to execute the rsync_argv.*
file.  First of all I noticed that that file is using the "--write-batch"
option when it should use "--read-batch".  Other than that it has the same
thing as what I ran by hand, and it doesn't work.

I see from the paper that the batching is supposed to (when it works) do
even more than I thought because you can take all the rsync_* files and
send them to the target machines and then everything runs on the target
machine only.  The idea with that is that the files would be suitable for
multicasting to all the machines at the same time.  That seems like a
pretty powerful way to do it, and I would think it would be faster even
for people who use unicast because the workload would get distributed across
across all the targets.  I'm concerned about what would happen if one of
the targets was slightly different than the one used as a prototype, though.

It looks like at a minimum a lot more testing needs to be done for these
options, and a lot more documentation written for the man page.

- Dave Dykstra

More information about the rsync mailing list