Reasons for rsync NOT transferring all files?

There are 2 parts to this question. First, why is there a difference between "Number of files" and "Number of files transferred". This is explained in the rsync manpage:

Number of files: is the count of all "files" (in the generic sense), which includes directories, symlinks, etc.

Number of files transferred: is the count of normal files that were updated via rsync’s delta-transfer algorithm, which does not include created dirs, symlinks, etc.

The difference here should be equal to the total amount of directories, symnlinks, other special files. Those were not "transferred" but just re-created.

Now for the second part, why is there a size difference with du. du shows the amount of disk space used by a file, not the size of the file. The same file can take up a different amount of disk space, if for example the filesystems blocksizes differ.

If you are still worried about data integrity, a easy way to be sure is to created hashes for all your files and compare:

( cd /home/hholtmann && find . -type f -exec md5sum {} \; ) > /tmp/hholtmann.md5sum
( cd /media/wd750/c51/home/ && md5sum -c /tmp/hholtmann.md5sum )

To all other poor lost souls working from vacation in the dead of night,

--checksum makes rsync actually check if there are changes in the files, otherwise it checks timestamps and file sizes and calls it a day,

this is sufficient in 99.9% of the cases and lets you burn in hell for the rest of the 0.01% until you figure this out


I might as well add something I learned.

I was using the command rsync /path/source/* /path/to/destination/* (notice the globbing). It was awkward because 90% of my files had transferred with a few exceptions (even being in the same folder as some that did transfer). After removing the * from source and destination, they all transferred. ¯\_(ツ)_/¯