After rsync folders have different sizes
There are a couple of reasons why there may be, or one may see, differences in sizes reported.
-
Reported sizes depend on the command you use, and what specifically is measured. The space used by the file, moreover, may depend on the file system and formatting options used to format the drive. Linux file systems also support sparse files. That means that parts of the files (e.g. binaries) that are empty are not physically stored on disk. Thus, the physical size of the file on disk (as reported by
du
) is smaller than its logical file size (as reported bydu --apparent-size
orls
). -
Another factor that may cause sizes of an
rsync
copy to differ is the presence of hard links. By default, hard links, i.e. different files pointing to the same information on disk, will be copied as separate files, thus take twice the space. -
Yet another possible cause of a size difference is that you repeated the backup. By default,
rsync
will preserve files on the copy that may have been deleted in the source. One must add the--delete
option to also delete these files on the targer.
The two latter reasons would lead to a target folder larger than the source folder, so this will not be an explanation in your current case.
rsync
is a very reliable tool, and its file comparison algorithms are robust. It compares files based on time stamp and byte size (logical size) of the file. Thus, if rsync
reports no further files need to be transferred, then you can trust that.