I am trying to create backup snapshots to my Samba shared drive. The idea is rather than overwriting the backup every time, I would like to create incrementing backup with hard links using rsync as described here. With the example below, after an initial sync to the "original" backup folder, I want to create a second backup of "~/source" in the "test" folder using the following command:
rsync -av --progress --link-dest=/mnt/NAS/test/original/ $HOME/source/ /mnt/NAS/backup/test I have tested it successful in my home folders and managed to confirm that the second folder is inded made up of hard link rather than a copy of the files themselves:
sending incremental file list created directory /home/anthony/backup/test sent 199 bytes received 12 bytes 422.00 bytes/sec total size is 372,377,648 speedup is 1,764,822.98 new files created: 0 hard link created: 4 356M ~/backup/original 4.0K ~/backup/test However, when I do the same operation on the NAS drive via samba using the same script, rsync does a full copy of the files (see size of of the "test" folder and number of files Vs hard links:
sending incremental file list created directory /mnt/NAS/test/test ./ 20220415.docx New File.txt New Microsoft Excel Worksheet.xlsx Movie.avi sent 218 bytes received 72 bytes 6.11 bytes/sec total size is 372,377,648 speedup is 1,284,060.86 new files created: 4 hard link created: 0 357M /mnt/NAS/backup/original 357M /mnt/NAS/backup/test I am led to believe that this is due to the fact that Samba is replicating Windows filesystems which don't understand hard links but just in case, am I doing anything wrong or is there a way around it?
5 Reset to default