Check Rebuild and Repair
When something looks wrong (missing snapshots, strange errors, backend interruptions), start with check and then move to targeted repair actions.
warning
Repository repair is not the first step for every error. If your backend credentials are broken or the network is down, fix that first.
What These Commands Do
| Command | Purpose |
|---|---|
restic check | validates repository structure and metadata |
restic rebuild-index | recreates the index from repository data |
restic check --read-data-subset | reads a subset of data to catch corruption earlier |
Common Repair Sequence
repair-sequence.sh
restic check
restic rebuild-index
restic check
tip
If rebuild-index fixes the issue, schedule more frequent checks for a while.
Data Read Validation
restic check --read-data-subset=20%
After Repair: Prove Restore Works
mkdir -p /restore/repair-test
restic restore latest --target /restore/repair-test
ls -la /restore/repair-test
warning
If backend issues are active (permissions, object lock, quota), fix those first before repeated repair attempts.