First, AFAIK, restic doesn’t support comparing local content with content of a snapshot - except directly after a restore
by using the -verify
option which you didn’t use.
So, the idea to mis-use the backup
command is not bad in theory. The idea is to specify the snapshot as --parent
(or let restic auto-select the right one) and check if backup
identifies no change - that would mean that the snapshot is identical to the data on-disc.
This however, has several problems: First, the path of the local data has to be exactly fitting to the snapshot path (I don’t know if this matches in your setting…). Second, when running backup
with a parent, files are assumed as unchanged if the file metadata (especially timestamps like mtime) matches the snapshot. That means a “successful” check doesn’t check if the file contents really do match. (And note, there is --force
but this does unset the parent, so backup
does read everything, but does no longer compare against an existing snapshot).
(As the author if rustic,) I recommend using rustic which can do the check. Both rustic diff --metadata <SNAPSHOT> /local/dir
and rustic restore --verify-existing --dry-run <SNAPSHOT> /local/dir
are able to verify that your local content is fine.