Gallery

DESIGN · {{host_suffix}}

Backups that look after themselves

Two small things that watch the result rather than the job, and a third that proves a restore still works without anyone remembering to try.

Settled3 modulesWritten


What this is for
"I want to stop having to check whether the backups ran. If they break I want to know, and I don't want to find out six months later when I need one."

Settled since: knowing within a day is soon enough; restore-testing is in scope; failures surface on the board rather than chasing {{owner_them}}; restores are tested monthly on one directory at random.

The pieces

Freshness checkearns its keep
Does
Asks the off-site store how old its newest copy is, and says fresh or stale.
Interface
One call in, one of three answers out: fresh, stale, or could-not-tell. Callers never see a store, a protocol or a credential.
Hides
Which store, how it authenticates, how a listing is paged, and every way asking can fail.
Tested at
Its own interface, against a fake store: fresh, stale, unreachable, and a store that answers with nonsense.
Deletion
Every caller would grow its own store client and its own idea of "too old". Three copies of a threshold is three chances to disagree. It concentrates.
Restore proverearns its keep
Does
Pulls one directory at random from the newest copy and checks that what comes back matches what went in.
Interface
Run it; it answers proved, failed with a reason, or could-not-run. Never partially true.
Hides
Choosing the directory, fetching it, comparing it, and cleaning up after itself when any step dies.
Tested at
Its interface, including the case that matters: a deliberately corrupted copy, which it must call failed rather than proved.
Deletion
The comparison is the hard part and it has nowhere sensible to go. It concentrates.
Alert routeronly moves it
Does
Takes a failure and decides where to send it.
Interface
One call in, and it writes a row on the board.
Hides
Nothing, as long as there is exactly one destination.
Deletion
Both callers would write the row directly, which is one line each. This is a name wrapped around a function call — it moves complexity rather than concentrating it.
Verdict
Dropped. The two callers write the row themselves. It comes back the day there is a second destination, and not before.

How it runs

  1. Each morning the freshness check asks the store. Stale or could-not-tell writes a row on the board; fresh writes nothing at all.
  2. On the first of the month the restore prover runs. Failed or could-not-run writes a row; proved writes nothing.
  3. There is no queue, no retry and no state between runs. Each run answers from the store as it is now, so a missed run costs one day of lateness and nothing else — no backlog to drain and no state to corrupt.

When it goes wrong

What failsWhat happens
The store is unreachableReported as could-not-tell, never as fresh. An unknown is a finding; treating it as fine is the failure this whole thing exists to prevent.
The check itself crashesNothing is written, which is invisible — so the check's own last-run time is on the board beside its answer. A checker that can die silently is not a checker.
A restore test half-finishesCould-not-run, not failed. Distinguishing "we could not tell" from "it is broken" is the point; collapsing them costs either trust or attention.
The board is unwritableNothing catches this yet. Named here rather than hidden — see the risk below.

How it is tested

What could still bite

The checker can die and take its own alerting with it

If the thing that reports failures is itself down, everything looks fine. Its last-run time goes on the board so the silence is visible, but nothing actively notices — and a human spotting a stale timestamp is exactly the failure mode being designed out. Accepted for now, tracked, and the cheapest fix is a second check watching the first from somewhere else.

A monthly restore of one random directory can miss rot for months

Rot in a directory that is never picked is not caught. Accepted deliberately: testing everything costs a full download each time, which was the trade-off settled on the intent page. Revisit if a test ever finds something — one real finding changes the odds enough to reprice it.