Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Reliability and Failure
Lesson 18 of 24

Backups and restore drills

Replicas do not protect against deletion or corruption; backups do, but only if you have restored them.

15 min read

Replication is not a backup

Replicas copy every change within milliseconds, including a DROP TABLE, a buggy migration, ransomware encryption or a script that deletes the wrong customers. They protect against hardware failure, not against mistakes. A backup is a copy taken at a point in time and kept separately, so you can go back to before the mistake. Most data loss in practice comes from human error and bugs, not from disks.

What a good backup strategy contains

Combine several layers. No single mechanism covers every failure, so layer them so that each covers a gap in the others.

  • Regular snapshots, for example daily full and hourly incremental
  • Continuous write-ahead log archiving for point-in-time recovery to any second
  • The 3-2-1 rule: three copies, on two kinds of storage, one off-site or in another account
  • Immutable or object-locked copies so an attacker with admin credentials cannot delete them
  • Retention long enough to catch slow corruption discovered weeks later

A backup you have not restored is a hope

Backups fail silently: the job stopped months ago, the files are empty, the encryption key was lost, or the restore takes 14 hours when you assumed one. In a well-known 2017 incident, a hosting company discovered during a production data loss that several of its backup mechanisms had not been working, and lost hours of data. Schedule restore drills: restore into a fresh environment, verify checksums and row counts, run application smoke tests, and record how long it took.

Restores are a capacity problem

Restoring 5 TB at 200 MB per second takes about 7 hours before any log replay or index rebuild. If that is longer than you can be down, you need a different plan: smaller shards that restore in parallel, warm standbys, or partial restore of just the damaged tables. Measure restore time as part of every drill and feed it into your recovery time objective. Remember that the restore environment needs enough compute, storage and network to receive the data quickly.

Key takeaways

  • Replicas copy mistakes instantly; only point-in-time backups undo them
  • Follow 3-2-1 and keep at least one immutable copy in a separate account
  • Test restores regularly and verify the result; untested backups often do not work
  • Restore time grows with data size; measure it and plan around it

Sign in to track lessons and earn badges.

Consistency under failure: split brain and fencingRPO, RTO and disaster recovery

Challenge checkpoint

Course: 0/24 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 7/10Design a File Sync ServiceProtect user files with chunk checksums, conflict handling during partitions and restorable versioned backups.Medium
All 10 challenges →