On Linux I've done an rsync syncing supposedly everything in /home to /backup. Both of these disk are the same size, but after the sync du -h shows around 50G difference. I want to know what the 50G difference is. What's the best way to check it?

link|improve this question

71% accept rate
Not an answer to your question but a possible reason: If /backup wasn't empty and you didn't use rsync's --delete option then /backup should be larger than /home. – Mike Fitzpatrick Mar 31 '11 at 5:46
Hi I did have the --delete option on. – huggie Apr 1 '11 at 5:48
feedback

1 Answer

up vote 2 down vote accepted

cd /backup ; find . -type f -printf '%P %s' | sort > backupcontent.txt.

Repeat for /home, then diff the resulting files.

%P %s are file name relative to the /home and /backup folders, and size. Add any attributes you care about.

This method assumes that a file that exists at both locations and is the same size (and other relevant attributes of your choice) is identical. You could additionally get file checksums using -exec.

link|improve this answer
Thanks it works. It turns out that there are files not in the ascii encoding that's not being backed up. – huggie Apr 1 '11 at 6:40
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.