On Wed 19 Dec 2012, VanL wrote:
> I have a question about what happens at the code level when I use
> --whole-file. I know that it turns off the rolling checksum. I also
> understand that it only checks the file's mtime and size to identify
> whether there should be some transfer. Two questions:
>
> 1) Could anyone give me a pointer to the correct file so that I can
> read what happens when --whole-file is used?
The manpage... If you're hard core you can read the source code :-)
> 2) When using --whole-file, does rsync use any kind of hash function
> after transferring the file to make sure that the originating and
> newly copied file are the same?
>From the manpage, admittedly mixed in with the --checksum option
description:
Note that rsync always verifies that each transferred file was
correctly reconstructed on the receiving side by checking a whole-file
checksum that is generated as the file is transferred, but that
automatic after-the-transfer verification has nothing to do with this
option?s before-the-transfer "Does this file need to be updated?"
check.
For the --whole-file case this won't be very meaningful as the data is
checksummed while writing to the file, which should always match the
checksum calculated while reading the source file...
For absolute security you can do a second run with --checksum.
Paul