Determine which snapshot of last diff

Hi folks, I’m pretty much fully converted to restic and now I’ve started on the extended family too, ha.

Is there a method to determine which snapshot resulted in a change, either at the snapshot level or the individual file level?

Use case: hourly backups of several files including my notes, password vault and calendar. This gives roughly 40-50 rolling snapshots after a daily forget/pruning. I want to see the diff for the latest change in my calendar. How do I determine which of the 40 snapshots contains a change in the calendar file? If we can’t do that, which of the 40 contains any change from the previous snapshot. (I have many snapshots that have no change from previous.)


AFAIK there is no command to do that (as with borg), but you can of course do something like this.

restic find --long | egrep -v '^$|matching' | tr -s ' ' | cut -d ' ' -f 5-7 | sort | uniq

You would still need to manually search for the corresponding snapshots but that shouldn’t be too hard.

1 Like

Good idea with the find, if you’d like to consume the output of find with a program, you can use restic find --json and read the resulting JSON stream. That’s a nice alternative to the shell pipe @764287 proposed.

1 Like