Lesson 13 of 13 · 14m
Disaster Recovery at 3 AM
Declare, freeze, classify, evict if hostile, restore, verify, reopen — in that order.
The actual event is not a restore procedure — it is an incident that ends in one. What happens in the first hour determines whether the restore is even the right move, and the ordering is: declare, freeze, classify, then act.
The first hour
Declare. Someone names it an incident and opens the doc — a shared note with timeline, decisions, and who's doing what. This sounds bureaucratic; at 3 AM with three people half-awake it is the difference between coordination and three divergent guesses.
Freeze. Stop the bleeding before understanding it: halt the cron that overwrites the last-good backup snapshot, freeze deploys, stop application writes if the damage is ongoing. The worst version of "help" is the automated system destroying your last clean artifact while you troubleshoot. Preservation before diagnosis.
Classify. Accidental or hostile changes everything downstream. Hardware failure: restore. Fat-fingered rm: restore. Attacker in the network: evict first — restore data onto a host somebody else is watching and you have just delivered it to them. Rotate credentials, rebuild the host from known-good, then restore. The ordering is not optional. One forensics footnote on freeze: if compromise is even possible, image the suspect host before rebuilding — an EBS snapshot of the volume costs minutes and preserves the evidence a clean rebuild overwrites. Asking "were we attacked?" after rebuilding is asking a question whose answer you just destroyed.
Choose the point. Which artifact? The last one verifiably before the damage. Binlog/WAL position, snapshot timestamps, deployment events — find the moment things were last good and restore to it, not to "latest," which may contain the corruption.
Then the runbook takes over: dependencies first, verification gate, traffic flip, slow reopen.
What the real events look like
Maersk, NotPetya, June 27, 2017. The wiper moved through 49,000 endpoints and the Active Directory domain in minutes. The recovery anchor was luck wearing a hard hat: a single domain controller in a Ghana office that happened to be powered off during a blackout when NotPetya swept through — the sole surviving copy of the directory the entire global rebuild was seeded from. Roughly ten days of rebuild, ~$300M in losses. The DR lesson: their backup coverage was real but correlated — one surviving copy outside the blast radius was the difference between a catastrophe and a closed company.
Norsk Hydro, LockerGoga, March 19, 2019. Ransomware across the aluminum producer's network; they refused to pay, restored from backups, ran plants on manual processes, and published honest technical updates throughout — including public postmortems with indicators of compromise. Estimated loss ~$75–80M, no ransom, recovery on their own terms. It is the model public incident: backups that worked because they existed and were reachable, and communications that stayed factual.
Code Spaces, June 2014, again: one credential domain, attacker deleted everything including backups, company gone within days. The counter-example to Maersk's lucky Ghana controller — no copy outside the blast radius existed at all.
The people and the drill
Systems get restored; incidents get handled. Who can be paged, who holds the repo passwords, who can declare the loss point and who can declare recovery done — the runbook names roles, not just commands. Comms are part of the mechanics: a status page note early ("investigating degraded service") buys honesty and time; silence buys rumors.
Game days are how any of this becomes real. Schedule the fire drill before the fire: monthly restore tests, an annual full-DR exercise on clean VMs with the clock running. GitLab's postmortem and livestream, Hydro's public updates — the organizations that recover in public are the ones that rehearsed in private.
The practice
A one-page DR doc with six decisions: declare, freeze, classify, restore point, sequence, reopen. Names and numbers for each — including who holds which key, and who can be paged at 3 AM and actually answer. Printed — the laptop holding the doc is on the same blast radius as everything else.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Self-Hosting Prometheus and Grafana: Infrastructure Monitoring That Actually Works
Build a production-grade monitoring stack with Prometheus and Grafana from scratch. Covers architecture, Docker Compose deployment, Node Exporter, alerting with Alertmanager, PromQL from basics to advanced, pre-built dashboards, and everything SudoSecurity uses to monitor its own infrastructure.
Zero Trust Everything: The Complete Guide to Self-Hosting Teleport for Secure Infrastructure Access
SudoSecurity runs Teleport internally for everything — admin panel access, secure database connections, Kubernetes, and zero-trust philosophy across our entire team. This is the complete technical guide to installing, configuring, and running your own self-hosted Teleport cluster from scratch.
Running a Minecraft Network: Four JVMs, One Box, and the Settings That Lie to You
Four servers on one host means four JVMs each sizing its thread pools for a machine it does not own. The measured cost of that, the systemd ordering that guarantees nothing, and the throttle that switches itself back on when your forwarding breaks.
Building a Minecraft Network: Four Servers Pretending to Be One Place
A proxy, a lobby, an SMP and a PvP arena is four JVMs that know nothing about each other. What actually has to be shared, why your permissions don't follow players, and the two LuckPerms defaults that silently share nothing at all.