Nice idea. As far as I understand it the script randomly selects a few files that should be unmodified (or from the latest snapshot just made?) and tests if they can be restored and contain the same content. Is that about right?
For the reference: There’s something similar on a different level already integrated in restic check
: when you specify --read-data --read-data-subset 1/10
, restic will read the first tenth of the files in the backend and verify the SHA256 hash. Calling --read-data-subset 2/10
will then read the second tenth, and eventually you’ve downloaded and checked all files in the backend.