- Sparse files may be expanded on copy when the
-S
flag is not used. (Will make the destination take more space)
- Hard links within the tree may be expanded to separate files on copy when the
-H
flag is not used. (Will make the destination take more space)
- Filesystems may have different allocation sizes. A one-byte file may take up 512 bytes of disk allocation on one filesystem and may take up 4096 bytes (or even more) on another. If your tree has a lot of small files, this will make a large difference. (Destination may take more or less space depending on the particulars)
- Directories may be much larger than necessary to hold the current contents on some filesystems. When the contents are copied, the directory will be smaller on the destination. Not normally a big deal, but some pathological directories can be enormous. (Will make the destination take less space)
It's also possible for filesystems to have different compression/deduplication/redundancy settings leading to different storage requirements for the data. But that's less common, and even when present the differences aren't always visible via du
.
sparse files
– Gilles Quenot Jan 10 '20 at 0:14