Some questions about restic after reading the mannual

I’v read the whole manual, But got some puzzle about the restic repo data safety.

  1. The manual said a check should be performed once a while, but it didn’t say what should the user do to recover the rest data if a irreversible damage were made. So

    1. Say because of some device fault, a few of the repo data block were missed, does the rebuild-index make sure the rest part of files successfully restored?

    2. Say because of some device fault or virus damage, a few of the repo data block were severely altered, the restic check is good, the restic check --read-data is not good, when using restic restore, an error would pop out. How can the user locate the bad data blocks and remove them then rebuild-index, so the rest of the data can be restored?

    so the fundamental question is, can restic restore the remained data if some part of the whole repo were missing or damaged?

  2. If I added many folder into the repo, many snapshots were made, how can I know how much size it grew after each backup? so that I can remove the unnecessary large garbage backups to clean the space.

Just to be nitpicky, the manual suggests you should test your backups exactly to avoid the problem that you have lost data. Because if you detect it before you need the data, you repair the corrupted repo by just creating a new one.

But it is a good question to ask, how to actually revocer as much data as possible from a accidentially broken repository.

The exact steps to repair a repository vary depending on which files were damaged, so it’s hard to give general instructions. The usual steps are listed here: Data blobs seem to be missing, aborting prune to prevent further data loss! · Issue #3023 · restic/restic · GitHub . In addition, it’s important to investigate why the repository was damaged in the first place to avoid repeated damage.

When running backup --verbose you’ll get statistics on how much new data was added to the repository by a backup. For the opposite direction there’s currently no easy way to determine how much space could be freed by deleting certain snapshots.