Fix for batch mode (was Re: batch mode maintainability)

Jos Backus josb at
Thu Jan 31 12:53:04 EST 2002

On Thu, Jan 24, 2002 at 06:19:56PM -0801, Jos Backus wrote:
> OK, I may need help with the markup part though, so I'll post a rough draft
> here first.

Here's my first attempt at improving the documentation of the batch mode
feature.  This is the manpage only; I'll attempt to update the yodl file once
everybody is satisfied with the wording, but I have no way to check it.

When people are happy with the docs I'll resubmit my batchmode cleanup patch.

Comments/suggestions welcome.

Index: rsync.1
RCS file: /cvsroot/rsync/rsync.1,v
retrieving revision 1.108
diff -u -r1.108 rsync.1
--- rsync.1	29 Jan 2002 21:52:56 -0000	1.108
+++ rsync.1	31 Jan 2002 01:51:16 -0000
@@ -306,8 +306,8 @@
      --log-format=FORMAT     log file transfers using specified format
      --password-file=FILE    get password from FILE
      --bwlimit=KBPS          limit I/O bandwidth, KBytes per second
-     --read-batch=FILE       read batch file
-     --write-batch           write batch file
+     --write-batch=PREFIX    write batch fileset starting with PREFIX
+     --read-batch=PREFIX     read batch fileset starting with PREFIX
  -h, --help                  show this help screen
@@ -801,12 +801,13 @@
 result is an average transfer rate equalling the specified limit\&. A value
 of zero specifies no limit\&.
-.IP "\fB--read-batch\fP" 
-Apply a previously generated change batch\&.
-.IP "\fB--write-batch\fP" 
-Generate a set of files that can be transferred
-as a batch update\&.
+.IP "\fB--write-batch=PREFIX\fP" 
+Generate a set of files that can be transferred as a batch update\&. Each
+filename in the set starts with \fBPREFIX\fP.
+.IP "\fB--read-batch=PREFIX\fP" 
+Apply a previously generated change batch, using the fileset whose filenames
+start with \fBPREFIX\fP\&.
@@ -913,29 +914,50 @@
 \fBNote:\fP Batch mode should be considered experimental in this version
 of rsync\&.  The interface or behaviour may change before it stabilizes\&.
-The following call generates 4 files that encapsulate the information
-for synchronizing the contents of \fBtarget_dir\fP with the updates found in
+Batch mode adds the ability to generate control information which describes
+the changes that need to be made in order to turn a source directory tree into
+a target directory tree. This control information is stored in 4 files which
+have a common, user-defined prefix:
+.IP o 
+<prefix>\fB.rsync_argvs\fP command-line arguments
+.IP o 
+<prefix>\fB.rsync_flist\fP rsync internal file metadata
+.IP o 
+<prefix>\fB.rsync_csums\fP rsync checksums
+.IP o 
+<prefix>\fB.rsync_delta\fP data blocks for file update & change
+This control information can be used to update an identical source directory
+tree (on another system perhaps) to the state of the target directory tree.
-$ rsync --write-batch [other rsync options here] \e
+$ rsync --write-batch=some_update [other rsync options] \e
-/somewhere/src_dir /somewhere/target_dir
+/this/src_dir /this/target_dir
+$ rsync --read-batch=some_update [other rsync options] \e 
+Note that in addition to creating the batch control files, the write-batch
+option also makes the target directory tree identical to the source directory
+Batch mode is useful when applying the same set of updates to many identical
+systems. Generating the batch control files once saves having to perform the
+file status, checksum and data block generation more than once when updating
+multiple source directory trees. Multicast transport protocols can be used to
+transfer the control files, instead of sending the same data to every host.
+\fBCaveat\fP: The -z/--compress option does not work in batch mode.
-The generated files are labeled with a common timestamp:
-.IP o 
-\fBrsync_argvs\&.<timestamp>\fP command-line arguments
-.IP o 
-\fBrsync_flist\&.<timestamp>\fP rsync internal file metadata
-.IP o 
-\fBrsync_csums\&.<timestamp>\fP rsync checksums
-.IP o 
-\fBrsync_delta\&.<timestamp>\fP data blocks for file update & change
-See \fBhttp://www\&.ils\&.unc\&.edu/i2dsi/unc_rsync+\&.html\fP for papers and technical
+See \fBhttp://www\&.ils\&.unc\&.edu/i2dsi/unc_rsync+\&.html\fP for papers and
+technical reports\&.
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at     _/_/   _/_/_/            use Std::Disclaimer;

More information about the rsync mailing list