Chapter 14: Data and failure

Backup and restore

A backup is a copy of your data, kept somewhere a mistake can't reach it. A restore is getting it back. Until you have really done a restore, you don't know the backup works, and a replica doesn't count, because it copies your mistakes too.

An agent will tell you backups are configured, because a setting says so. That is not evidence that you can get the data back, how long it takes, or that the backup isn't kept in the same blast radius as the thing it protects. Ask it to restore one and count the rows.

Say it to your agent

“Restore last night's backup into a new database called restore_test. Tell me how long it took, compare row counts on the five biggest tables with production, then write that up as a scheduled job that alerts when it fails or when the newest backup is over 25 hours old.”

The workshop

Name a word, or describe what you mean in everyday language.