I have a simple script which runs rsync periodically to backup my storage drive
rsync --delete --stats -PSvahHAXx --log-file=Backup_<TIME> --link-dest=Backups/<lastBackup> <StorageDrive> "Backups/<nextBackup>"
If i reorganize my storage between backups, rsync would not recognize it and would just create a new copy, instead of creating a hardlink (e.g. renaming or moving a folder). Thats why I follow the above command with
jdupes --recurse -L Backups/
Finding duplicates and linking them with hardlinks.
However, when I do this, the next time I run rsync, it does not creat hardlinks, but copies everything again. I guess because some attributes of the files are now different to the source of the Storage drive.
Is there a way to tell rsync to ignore file attributes and just compare the content of the file at the same location, to determine if its the same and can be represented by a hardlink.