Skip to content
StackDecode
System Design
5. Advanced Database ArchitectureAnimated

Database Recovery

Restoring a database after a crash or error.

The idea

Write-ahead logs and backups allow restoring to a consistent state, even to a point in time.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Primary regionBackupsStandby regionRunbook
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Back up data and replicate it to another region.

step:
1/4
at:
Primary region
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Restore the last backup
  2. 2Replay the log
  3. 3Stop at the target moment
  4. 4Verify and reopen

Where it is used

Disasters and mistakes.

Watch out for

Untested backups are not backups.

Related