10.2.5 · Skill in Reliability engineering

Backups and disaster recovery

Being able to restore data and service after a major failure.

Backups that have never been restored are hopes, not backups. Disaster recovery plans set how much data you can lose and how long you can be down. Testing restores regularly is the only proof they work.

Your status · Backups and disaster recovery

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

Replication protects against a failed machine. It does not protect against a deleted account, a bad migration or ransomware, because the mistake is copied too. Backups do, but only if they are separate, complete and restorable. A recovery plan sets two numbers: how much data you can lose (the recovery point objective, RPO) and how long you can be down (the recovery time objective, RTO). Product engineers own the data and the code that restores it.

How to do it

  1. Set the RPO and RTO for each kind of data, with the people who know what a loss costs.
  2. Keep backups outside the system they protect: another account, region or provider.
  3. Restore from backup on a schedule, into a clean environment, and time it.
  4. Write the restore steps as a runbook or a script that someone else can follow.
  5. Monitor backups: alert when one fails, is late, or is much smaller than usual.

Common mistakes

  • Treating replicas as backups.
  • Backups in the same account, so one mistake or attack deletes both.
  • Backups that nobody has restored, so nobody knows whether they work.
  • A recovery time that depends on one person who knows the steps.

Example

In May 2024, Google Cloud deleted a private cloud of UniSuper, an Australian pension fund. When Google operators had set it up a year earlier with an internal tool, they left one parameter blank. The system gave it a default term of one year, and at the end of the year it deleted the private cloud, which ran across two zones, with no notice. Backups in Google Cloud Storage were not affected. Together with third-party backup software, they made the restore possible, after several days of work.

Flow

What the deletion reached, and what it did not

Blank fieldIn an internal tool1-year termA default nobody knewDeletedPrivate cloud, both zonesBackupsCloud Storage, not hitRestoredAfter several daysBlank fieldIn an internal tool1-year termA default nobody knewDeletedPrivate cloud, bothzonesBackupsCloud Storage, not hitRestoredAfter several days

Two zones did not help, because the deletion reached both. Backups stored outside the private cloud did.

ReportedGoogle Cloud blog, 24 May 2024

Sources: Details of Google Cloud GCVE incident (Google Cloud) ↗ · Perform periodic recovery of the data to verify backup integrity (AWS Well-Architected) ↗ · What are business continuity, high availability and disaster recovery? (Microsoft Learn) ↗ · Disaster recovery options in the cloud (AWS) ↗

Resources

3

Tools

1
Tools for Reliability engineering