Patch: Offline transfer mode

Wayne Davison wayned at
Wed Mar 23 17:19:16 GMT 2005

On Sun, Mar 20, 2005 at 08:46:20PM -0800, Steve Traugott wrote:
> Here's an rsync patch which adds an --offline flag, letting you
> transfer changed blocks via removable media, while still comparing
> checksums via the net.

I'd prefer a different option name for this.  Some folks have suggested
combining --write-batch with --dry-run for this functionality (there's
an enhancement request for this in bugzilla), which is a pretty decent
choice since --dry-run doesn't currently work with --write-batch.  But
it might be better to keep the --dry-run idiom unchanged and use a
different name for the --offline option, such as --batch-only.  I'd
think I'd prefer the latter, since it would allow the current --dry-run
behavior to be fixed to work with --write-batch.

We'll want to change the generator to not do any work other than
generating checksums.  One way would be to actually set dry-run in the
generator, and then change the code near the checksum-sending to not be
skipped if the batch-only mode is enabled.

On the sending side, I think the code could be simplified to simply
output the data directly to the batch fd instead of changing the monitor
fd and writing to a dummy fd.

Also, the code should deal with the combination of pulling data with
this new option.  Since the batch file is created locally, this
combination cannot save any bandwidth, but it could still be used to
only create a batchfile without doing any updates.  This means that the
batch-only option only needs to be sent to the server if the server is
the receiver, and the receiver would need to just discard any received
updates when this option is enabled.

Thanks for the patch!  If you feel like doing some more work on this,
feel free.  If not, I'll look at it some more eventually.


More information about the rsync mailing list