repository 358a1f67 opened successfully, password is correct
comparing snapshot 9c2a58ee to 0a5ddce8:
Files: 0 new, 0 removed, 0 changed
Dirs: 0 new, 0 removed
Others: 0 new, 0 removed
Data Blobs: 0 new, 0 removed
Tree Blobs: 0 new, 0 removed
Added: 0 B
Removed: 0 B
I am wondering whether this could be considered a bug? I was recently comparing backups from before/after a significant system change and thought all was well but in fact some files had their timestamps altered by mistake.
Can you please elaborate on what you think is a bug and what you expect to see instead of what you are seeing? You’re expecting the file to be listed as changed due to the change in metadata?
By default, the diff command does not print files for which just metadata has changed. You can enable this with the --metadata flag. For me, the output of restic diff then looks like this:
$ restic diff -r repo --metadata b5572e20 5f235627
comparing snapshot b5572e20 to 5f235627:
U /thing.txt
Files: 0 new, 0 removed, 0 changed
Dirs: 0 new, 0 removed
Others: 0 new, 0 removed
Data Blobs: 0 new, 0 removed
Tree Blobs: 0 new, 0 removed
Added: 0 B
Removed: 0 B
The stats at the bottom count the tree blobs wrong for metadata-only changes in the top-level directory of the snapshot (it works for metadata changes in a subdir), that’s a bug you’ve just discovered. But restic indeed saw the changed modification time.