Thanks a lot @cdhowie for debugging this!
I just learned: Adding a new hard link to a file changes its ctime
:
$ stat testfile
[...]
Access: 2020-12-17 22:31:08.318146994 +0100
Modify: 2020-12-17 22:31:08.318146994 +0100
Change: 2020-12-17 22:31:08.318146994 +0100
$ ln testfile testfile2
$ stat testfile
[...]
Access: 2020-12-17 22:31:08.318146994 +0100
Modify: 2020-12-17 22:31:08.318146994 +0100
Change: 2020-12-17 22:31:13.926046483 +0100
[...]
That’d make restic re-read the file.
By default, restic’s algorithm for detecting changes pragmatic: if in doubt, re-read the data. That’s the most conservative approach and I’m convince it’s the right one. We’re still tuning the algorithm though, and there’s a PR for adding the option --ignore-ctime
to cover exactly this use case.
Maybe that’s what happened to you. Do you by chance use something like rsnapshot
?
Have a nice weekend!