Skip to content

Lesson 7 of 9 · 27m

Automating Verification: Proofs Stronger Than Green Checkmarks

Build automated verification that inventories, checksums, samples, boots, restores, and validates application invariants instead of merely reporting job success.

Backup monitoring often stops where risk begins. 'Job completed' tells you a process exited successfully. It does not tell you the restore point includes the right data, can be read, decrypts, passes consistency checks, or satisfies application invariants. Verification has to move progressively closer to reality.

Build a verification ladder

1-2 existence/readability      expected point exists and metadata opens
3-4 integrity/decryptability   checksums pass and keys work
5-8 restore/boot/verify/time   clean restore, service checks, invariants, RTO budget

Most environments stop at level one. Mature environments automate as far up the ladder as cost and safety allow.

Use the backup tool's checks — then go beyond them

Restic can verify repository structure and sampled content, but not application correctness:

restic check
restic check --read-data-subset=5%

Automate canary data

Put known, low-sensitivity canary records into production-like systems and verify they survive round trips:

INSERT INTO backup_canary (probe_id, written_at, payload)
VALUES ('nightly-restore-check', now(), 'checksum-seed-9f31');

After a test restore, query the canary. If the canary is missing but the restore 'succeeded,' you have learned something cheaply. Rotate canary values so you know which backup generation was tested.

Scripted restore checks beat heroic memory

A verification job can restore into an isolated namespace or host and run service-specific checks:

set -euo pipefail
WORKDIR="/var/tmp/restore-check-$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$WORKDIR" && trap 'rm -rf "$WORKDIR"' EXIT
restic restore latest --target "$WORKDIR" --include /srv/app-data
(cd "$WORKDIR/srv/app-data" && sha256sum --check manifest.sha256 --strict)

This example is intentionally narrow. The point is repeatability: same target layout, same manifest, same pass/fail rules, artifacts retained for review.

Alert on absence, not only failure

The most dangerous state is often silence. If the backup pipeline crashes before creating a job record, no failure alert exists. Track expected recovery-point freshness:

time() - backup_last_successful_restore_point_timestamp{service="billing"} > 93600

Alert when the timestamp is too old, when size changes anomalously, when object count collapses, and when verification duration drifts beyond its RTO budget.

Field notes

  • Verification must use non-production credentials and targets so mistakes do not overwrite live data.
  • Sample percentage is a risk decision; write down who chose it and why.

Was this lesson helpful?

Sign in to rate