Hi, I just did a backup of my main laptop using rsync: rsync --archive --acls --xattrs --hard-links \ --sparse --stats --human-readable --checksum \ --link-dest=/mnt/backup/previous/home \ /mnt/home/ \ /mnt/backup/current/home The idea is that files that exist in the previous backup are hard-linked into the current backup, saving space. But how much did I save? How many files and how many bytes are hardlinks? Maybe the info is in the rsync output, but I do not see it clearly:
Number of files: 252,287 (reg: 237,101, dir: 14,772, link: 375, special: 39) Number of created files: 29,678 (reg: 28,379, dir: 1,283, link: 16) Number of deleted files: 0 Number of regular files transferred: 32,447 Total file size: 257.29G bytes Total transferred file size: 16.85G bytes Literal data: 16.85G bytes Matched data: 0 bytes File list size: 4.91M File list generation time: 0.004 seconds File list transfer time: 0.000 seconds Total bytes sent: 16.87G Total bytes received: 648.53K
sent 16.87G bytes received 648.53K bytes 2.22M bytes/sec total size is 257.29G speedup is 15.25
real 126m33.023s user 27m19.699s sys 10m16.830s
Maybe the clue is total size 257G vs sent 16.8G I know that summing up all the files in the backup disk (XFS) they take 1105G (by mc), but "df -h" says the disk is 932G, 648G are used, and 248G are free, so indeed there is saved space. And after erasing the home backup (I did it twice, so I deleted one copy), which takes 245370M bytes, df reports: Legolas:~ # df -h /media/Erebor_2/ Filesystem Size Used Avail Use% Mounted on /dev/sdb1 932G 617G 315G 67% /media/Erebor_2 So one home backup uses 648-617 = 31GB, and about 214G are hard links. But it is a roundabout manner of finding out... (I have doubts about what GB units are the tools using, too) -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))