This is an extension to Why rsync attempts to copy file that is already up-to-date?
I'm attempting to use the --copy-devices
patch to rsync
to copy an entire disk drive and store it as an image on another machine.
The copy appears to have run correctly however, when I run rsync
again with the same values, it appears to copy some of the data again every time.
I ran rsync
with the verbosity turned up and got this:
$ sudo rsync -vvz --partial --progress --copy-devices /dev/sdb me@otherserver:/backupdisks/mydisk.img
opening connection using: ssh -l me otherserver rsync --server -vvze.Lsfx --partial --copy-devices . /backupdisks/mydisk.img (11 args)
me@otherserver's password:
delta-transmission enabled
sdb
320,071,851,520 100% 63.47MB/s 1:20:09 (xfr#1, to-chk=0/1)
total: matches=2441955 hash_hits=2441955 false_alarms=204015955 data=0
sent 188 bytes received 21,979,001 bytes 2,837.31 bytes/sec
total size is 0 speedup is 0.00
I'm aware that rsync determines changes by time, but the disk has not changed between rsyncs (and how would it determine the modified time of a disk anyway?) The time on the remote image, however, does get updated each time. So this could be the issue.
The other possibility is that the disk has a bad sector which is returning a different value each time and negates whatever checksum is being used.
My question is two-fold:
Has my image been transferred successfully and, if so, why does it appear to retransmit much of the disk if I run it again? (This may also be partly answered as part of my corollary question What are "matches", "hash_hits", and "false_alarms" in rsync output, and does "data=0" mean success? )
Am I missing a switch to make this work properly? (Maybe
--checksum
?) Is it possible to list block-level failures used by the rsync algorithm?