Rsync help needed...
Linus Hicks
lihicks at gpi.com
Thu Feb 23 19:32:44 GMT 2006
Matt McCutchen wrote:
> On Wed, 2006-02-22 at 11:43 -0800, lsk wrote:
>
>>Currently I use "rsync -czv" c for checksum.
>
>
> If each data file's first few bytes ("header information") change
> between rsync transfers, then --checksum buys you nothing. Normally
> rsync will skip transferring a file if the receiver has a corresponding
> file of the same size and modtime; --checksum makes both sides read
> their files entirely and skip transfers based on the MD4 of the file's
> data. However, since the header information changes, the checksums will
> never match and rsync will transfer the files, but the transfers will be
> fast because so little of the files changed.
>
> On the other hand, if the modtimes of the files are changing but their
> data is not, using --checksum will result in a relatively small
> reduction in network traffic: rsync will notice the files match
> immediately instead of after comparing a few kilobytes worth of block
> hashes. However, rsync will read each changed file once to compute the
> checksum and again to transfer it, so the disk hit increases.
>
> Someone correct me if I am mistaken about how incremental transfer and
> --checksum work.
Consider using --inplace and --no-whole-file. If you don't use --inplace, rsync
will write a temporary file, then copy it. This requires additional disk space
as well as the time and potentially extra I/O.
At a minimum, when an Oracle database is opened and closed, the timestamps on
all datafiles will be updated because the header blocks will get updated with a
new SCN. So the timestamps on all datafiles will always look different the next
time you rsync. The --checksum will just cause extra I/O.
Linus
More information about the rsync
mailing list