If there are sparse files on the source server, the total size of the migrated files on the target server may be smaller than that on the source server. This is because rsync automatically truncates sparse files during transmission. The file system transparently converts metadata representing empty blocks into "real" blocks filled with null bytes at runtime.
You can check whether the files are consistent before and after the migration. For details, see Procedure.
In a UNIX file system, when the file displacement is greater than the file length, the next write operation will extend the file length and form a hole in the file, creating a sparse file. This is achieved by writing brief information (metadata) representing the empty blocks to disks instead of the actual "empty" space which makes up the block, thus consuming less disk space. The full block size is written to disk as the actual size only when the block contains "real" (non-empty) data.
ll /tmp/test-data.img
du -sh /tmp/test-data.img Figure 1 Checking the file size
Figure 2 Checking target server file size

If the sha256 values of the files are the same, the file content is consistent.
sha256sum /tmp/test-data.img
Figure 3 Obtaining the sha256 value
