The Incident: The Restore Nobody Had Run

Incident Hook

Thursday, 14:20. Boris asks his AI agent to clean up test accounts in production. It writes a DELETE with a condition that matches far more than test accounts, and runs it. Half of the user table is gone.

14:26. Support: users cannot log in. Ana stops the agent and opens the database dashboard: the backups are green - one every night, the last at 03:00.

14:30. “Restore last night’s backup,” Boris says. Ana does the arithmetic: everything since 03:00 - eleven hours of sign-ups and changes - would be lost with it. They need the database as it was at 14:19, one minute before the DELETE.

14:35. Nobody on the team has restored this database before. Ana writes a restore cluster from the documentation, calls it pg-restore, and applies it. It stays in Setting up primary. Twenty minutes later it still does; the recovery pod restarts with a timeout nobody can explain.

15:40. Someone remembers Chapter 06: the namespace is default-deny, and the network policies let only app-postgres reach the backup store and the Kubernetes API. The restore cluster had no way out. With a policy added by hand, it starts - and goes Ready at 15:52.

15:55. “It’s back,” says Boris. The application still cannot find the deleted users. The restore had no target time: it replayed every archived change, including the DELETE.

16:40. A second restore, to 14:19, is Ready at 16:51. Ana checks the user table with the application’s own user: the rows are there. The application is switched to it at 17:10.

Result: the backups were fine all day. The restore took almost three hours - because it was being learned during the incident.

Diagram: 14:20 DELETE half the users; backups green; first restore hangs: network policy; Ready, but the DELETE was replayed too; second restore to 14:19; 17:10 users back

The story is invented; the restore that hangs on the network policies and the backups that no alert watched were this platform’s own state before this chapter’s changes.

Observed Symptoms

  • The backups list shows completed every night; nothing looks wrong until a restore is needed.
  • The restore cluster stays in Setting up primary; its recovery pod restarts with i/o timeout - a connection silently dropped, not refused.
  • A restore that reaches Ready still has the wrong data: Ready says Postgres started, not that the rows you need are in it.
  • Nobody can say in advance how long a restore takes.

Confusion Phase

The first hour goes to the wrong questions:

  • Are the backups broken? - they are not;
  • is the storage slow? - it is not;
  • should we restore over the production database to save time? - that would destroy the only copy of the evidence.

Was the problem the backups - or a restore path nobody had ever walked?

What AI Would Propose (Brave Junior)

  • “The backups are green, so we are covered.”
  • “Restore last night’s backup over production - it is the fastest way back.”
  • “The restore cluster is Ready, so the incident is over.”

Why This Is Dangerous

  • A green backup is not a restore. It proves files were written. Only a restore proves they become a database - with your network rules, your quotas, your credentials.
  • Restoring over production destroys evidence and options. If the restore is wrong, there is nothing left to try again from. A restore goes into a new cluster; production is switched only after the proof.
  • “Last night” is a choice of how much data to lose. With an archive of every change, the right target is the moment before the damage, not the last full backup.
  • Ready is not recovery. The proof is the data: the rows you expect, read with the application’s own user.

Pause and Predict: The platform takes a full backup once a night. How can it restore to 14:19 - eleven hours later?