Using restic backup on different configurations, I’ve observed that in some configuration I had to use the --ignore-inode switch to restic backup command.
As the inode number of backuped files is constant, I was a little surprised/disapointed!
Finally, I’ve understood that the problem is coming from the count of hard links.
Of course as in this configuration, the root of backuped files is already a backup.
Here, my old backup-rotate script do something like:
Then now, if I try to cd $backups && restic backup $root, the ignore-inode flag is required, even if all files in $root keep a constant inode number: all files will see the count of hard links modified.
So I think:
Considering count of hard link in the same flag than inode number is wrong.
There must be a different flag!
If the only thing varying in a file entry is the numbers of hard links, having all other properties (dates, owner, perms, dates and inode number) constant, they could be considered as unchanged by default?
Anyway, many thank for sharing your work and happy new year!
The --ignore-ctime flag might be what you’re after, rather than --ignore-inode. A quick test on my system shows that ctime/change time gets updated when making a hard link (because the file metadata has been updated):