In lieu of a feature like this, I used restic mount (described here) and rclone sync (described here) and it seems to work quite well - only downloading files that are different, and removing ones that donāt exist in the restic repo.
Note that for that solution, rclone needs to read local existing files as well as the data for those files saved in the repository (in order to do the comparison). This might be ok for local repositories but can be expensive or slow for remote repositories - especially if most local files are already in a correct state.
The PR I proposed instead only needs to read the local files, and hashes the chunks of the local files as defined by the repository metadata in order to know which actual data is really needed from the repository.
It may not work for all situations but you could do a ārestic backup --dry-runā now. The --dry-run will tell you which files are different based on meta data. You would likely need to manipulate the output to put it into a format which could be used for a restore but running this would give you a relatively quick way to see the differences between source files and backup repository using existing commands.
first, if you want to get information about restoring a specific snapshot in this way, please donāt forget to use that snapshot as parent by specifying --parent. If you donāt, the newest snapshot will be taken as ācomparisonā.
second, yes, this compares the parent snapshot with the data on-disc. But it doesnāt use all metadata, but only file sizes, modification time and inode number. If you want to compare the file contents with the ones saved in the repo, the backup command is not useful: Either it uses a parent and then does not read the file if it matches. Or there is no parent (e.g. when running with --force) then backup will read, chunk and hash the file but only checks if that chunk is available in the repo and not if the file is identical to the corresponding file in the snapshot.
So for a dry-run check if local contents equal to snapshot contents, a combination of #3425 and this PR