rsync --append behavior

Jacob Balazer rsync at balazer.co.uk
Tue May 22 19:06:32 GMT 2007


On 5/22/07, Paul Slootman <paul at debian.org> wrote:
> On Sat 19 May 2007, Jacob Balazer wrote:
>
> > I am using rsync 2.6.9 in daemon mode under Cygwin, and having trouble
> > reconciling its --append behavior with that described in the man page:
> >
> > The man page says that when you use --append, it will update a file by
> > appending, which presumes the existing data on the receiving side
> > matches.  But when I run rsync with append mode when the existing file
> > on the receiving side is shorter than on the sending side, the first
> > thing it does is (I think) is to read either most of or all of the
> > file on the remote sending end: on the local receiving end, it says
> > "recv_generator()" for each of the files, "generating and sending sums
> > for 1", and then "generate_files phase=1", and then no progress for
> > several minutes.  After that several minutes, apparently a
> > block-by-block comparison of the existing data starts.  This operation
>
> Rsync will always do a checksum verification of updated files, even with
> --append. The manpage also says: "If that [the existing data is
> identical] is not true, the file will fail the  checksum  test, and the
> resend will do a normal --inplace update to correct the mismatched
> data.". Hence the file will still be completely read.

Right.  But isn't the checksum test referred to there performed after
the append or update operation?  Otherwise, what's the point of the
--append option, if the check is performed beforehand?   A checksum
computation takes as long as a block-by-block comparison, for large
files.

Jacob


More information about the rsync mailing list