Checking local files integrity agains repo

While @David 's solution works well, note that it needs to download all data from your repository to locally compute the SHA256 hashes of each file backup’ed. If your repository is remote this may take a long time and may be expensive.

An alternative would be to simply run backup --force (which re-reads, re-chunks and re-hashes every file) and then restic diff to compare the newly generated snapshot with any of the already existing snapshots. This only needs to read local files. However, it saves extra data in the repository if your local files are changed (e.g. corrupted).

2 Likes