| name | verify-backup |
| description | This skill should be used when the user asks to "verify my restic backup works", "test a restic restore", "check restic snapshots and integrity", "validate backups before enabling the schedule", or needs to run the first backup, confirm snapshots, run restic check, test-restore, then enable the timer. |
Verify the Backup (the enable gate)
A backup you have never restored is not a backup. Run the first backup by hand, confirm it, prove a restore works, then enable the schedule. This is the gate scheduling depends on.
Step 1 — First run
/usr/local/sbin/restic-backup.sh
The first run uploads everything and is the slowest; later runs are incremental (restic deduplicates).
Step 2 — Confirm the snapshot
set -a; . /root/.restic/r2.env; set +a
restic snapshots
restic stats latest
Cross-check the captured paths against the discover-backup-sources plan — confirm the right directories and the DB dumps were included, and nothing huge/regenerable slipped in.
Step 3 — Integrity check
restic check
restic check --read-data-subset=5%
check validates structure for free; --read-data-subset actually reads data back from R2 to catch storage-side corruption without the cost of a full --read-data.
Step 4 — Test restore + diff (the real proof)
mkdir -p /tmp/restic-verify
restic restore latest --target /tmp/restic-verify --include /usr/local/sbin/restic-backup.sh
diff /tmp/restic-verify/usr/local/sbin/restic-backup.sh /usr/local/sbin/restic-backup.sh \
&& echo "RESTORE OK"
rm -rf /tmp/restic-verify
Pick a file you know and restore it to a scratch target, then diff against the original. For a DB, restore the dump and confirm it is non-empty and parses (e.g. zcat | head).
Step 5 — Enable the schedule (only now)
systemctl enable --now restic-backup.timer
systemctl list-timers restic-backup.timer
Verification checklist
Gotchas
- Verify is the enable gate — never enable the timer before a clean snapshot + check + test-restore.
- Restore to scratch, never over the source —
--target /tmp/..., then discard.
- Confirm the right paths — a backup that ran successfully but captured the wrong directories is still a failure; cross-reference the discovery plan.
- Check the DB dump is real — a dump created with
docker exec -t (wrong) can be empty yet the run still "succeeds." Restore it and look.
- First-run time/cost — the initial full upload to R2 can take a while; set expectations. Subsequent runs are incremental.
What this skill does NOT cover
- Building the script / schedule →
backup-script, scheduling
- Ongoing health (freshness, alerts, periodic check) →
monitoring
- Real recovery →
disaster-recovery