how do i verify rsync
I've been playing with rsync. I've copied some data from one drive to another, I don't see any errors, but when I inspect with du -s I get two different values
root@T/home/user/Desktop# du -s backups 759421964 backups root@T:/home/user/Desktop# du -s /data/tmp.moved/ 759568528 /data/tmp.moved/ root@T:/home/user/Desktop# How can I see what's different? I've been playing with diff and find/ls, but it's not as nice/complete as I'd like. I did the following as root: cd sourcedir ls -aR > ~user/original cd backupdir ls -aR > ~user/backup cd ~user diff -yW 200 original backup > diff.txt grep \> diff.txt grep \< diff.txt grep \| diff.txt all came back null Doing the above with ls -laR got messy... Note: the source is an XFS filesystem (on a RAID5 array, if that matters), the backup filesystem is an EXT4 filesystem. Could the difference in size be due to the difference in filesystem architecture? The original rsync command was: rsync -aHvPh --delete /data/tmp.moved/ ~user/backups hmm.... I just realized I left the trailing slash off the end of the backups directory... not sure if that would cause difference in disk usage, though... the diff of the ls -aR showed no differences. Any ideas? Thanks, WT |
Each file system will indeed allocate the data differently, most likely caused by how they handle journaling. Another potential cause is your source directories have expanded and retracted in size. They will still have space allocated in the directories for the deleted file names even if the directories are empty. Since rsync rebuilds the directories from scratch during the copying process, the new directories on the target no longer have that space allocated for missing files.
|
Quote:
WT |
I agree with Omnicronos that it's most likely just the difference in filesystems. But if you wanted to be sure you could make a checksum before the transfer, and then verify against it afterwards.
|
Quote:
Quote:
|
All times are GMT -5. The time now is 02:53 PM. |