The concept A backup is not proof of recovery
The team configured automated backups. The customer asks: Have you tested restoring them? They have not. A backup that has never been restored is an assumption, not a recovery capability.
| Protection | Why |
|---|---|
| Automated backups and point-in-time recovery | Restore to any moment within retention, meeting an RPO of minutes |
| Object versioning | Recover deleted or overwritten settlement files |
| Backup encryption and separate permissions | A compromised application role cannot delete its own backups |
| Cross-account or cross-region copies, when justified | Survive account compromise or a regional disruption |
| Documented retention and periodic restore tests | Prove the capability; meet the customer’s retention rules |
A platform is more than its database. Recovery must bring every dependent part back to a consistent point, or the restored database disagrees with the files, queues and keys around it:
| Part | How it is protected | How it is recovered consistently |
|---|---|---|
| PostgreSQL | Automated backups and point-in-time recovery; copies in a separate account when justified | Restore to a chosen time T; everything else is brought into line with T |
| Settlement files in S3 | Versioning, write-once retention for originals, replication when justified | Files received after T are still in S3: re-register them by checksum, which is idempotent |
| Queue messages | Not backed up; a queue is in-flight work, not a record | Rebuild the work from the database: re-enqueue payments that are RECEIVED but not processed, and republish PENDING outbox rows |
| Payments after T | Lost from the database, within the RPO | Find the gap by comparing with each provider's reports, and ask providers to resend |
| Secrets | Secrets Manager, replicated to the recovery region when justified | Applications read them at start-up; rotate any that may have been exposed |
| Encryption keys | KMS keys with deletion protection, multi-Region keys when needed | A backup encrypted with a key you can no longer use is lost, so recover the keys first |
| Infrastructure | Terraform code and protected state | Recreate the environment from code, then restore data into it |
The restore test validates the business, not just a running database: compare record counts and control totals, check transaction and audit history, confirm the application version works with the restored schema, measure the duration and record any data lost, then write down the gaps.
Worked example A full recovery runbook
The table above says what to recover. A runbook says in what order, and what to check before moving on. Here is the Apex runbook for restoring the platform to a time T after a database failure. The order matters: keys before backups, infrastructure before data, the database before the work that depends on it.
| Step | Action | Check before the next step |
|---|---|---|
| 1. Declare and freeze | Declare the incident; stop ingestion so the API answers 503 and providers retry later; agree the restore time T with finance | No new writes; T and the decision recorded in the incident log |
| 2. Keys and secrets | Confirm the encryption keys are usable and the secrets exist in the recovery environment | A test backup decrypts; every secret the services need is present |
| 3. Infrastructure | Recreate the environment from Terraform | The plan matches the code; health checks pass on empty services |
| 4. Database to T | Point-in-time restore of PostgreSQL to T | Record counts and control totals match the last reconciliation report before T; the application version works with the restored schema |
| 5. Settlement files | Re-register files received after T from S3, by checksum | Every file after T has exactly one batch row, and its totals check passes |
| 6. Queue work | Re-enqueue payments that are RECEIVED but not processed; republish PENDING outbox rows | The queue drains; duplicate postings stay at 0, because consumers deduplicate by event ID |
| 7. Payments after T | Compare each provider's report for the window after T with stored payments; ask providers to resend the gap | Stored count equals the provider count for the window; resends answered 202 or 200, never twice |
| 8. Reopen and record | Reopen ingestion gradually; record the actual RTO, the data lost in time and count, and every gap in this runbook | Error rate and oldest message age back to normal; the record signed by the incident lead and finance |
Put a price on it What each strategy costs
Each step up the ladder buys a faster recovery with a bigger monthly bill. The amounts below are illustrative assumptions in US dollars, added on top of normal production, for practice only. The recovery times are the usual ranges for each strategy, not promises: only a measured drill tells you yours.
| Strategy (illustrative) | Added cost a month | Over three years | Usual recovery time |
|---|---|---|---|
| Backup and restore | $400 | $14,400 | Hours |
| Pilot light | $1,500 | $54,000 | Tens of minutes |
| Warm standby | $5,000 | $180,000 | Minutes |
| Multi-site active | $14,000 and up | $504,000 and up | Near zero, with conflict handling to build |
Now apply the example objectives: RPO 15 minutes, RTO 2 hours. Point-in-time recovery meets the RPO in every row. So the question is whether the cheapest strategy meets the RTO. In the sample restore record below, the database restore took 47 minutes. If the whole runbook, steps 1 to 8, fits comfortably inside 2 hours in a drill, backup and restore is the answer, and it saves about $39,600 over three years compared with pilot light. If the drill takes 1 hour 50 minutes, the margin is too thin: propose pilot light, and show the drill result as the reason.
Practice Design and test recovery
Practical exercise
Exercise 10: the Apex recovery plan
With example objectives RPO 15 minutes and RTO 2 hours, design recovery for five scenarios and run one restore.
- Database failure and accidental data deletion.
- Object storage corruption or deletion.
- A regional disruption and compromised deployment credentials.
- Restore the database into an isolated environment and record the actual time.
Show a sample restore record
- Restore: point-in-time to 14:05; finished in 47 minutes; 0 records missing against the 14:05 control totals.
- Gap: the runbook missed re-pointing the worker’s secret; added and retested.
3 questions
Check your understanding
What you can do now
- Explain RPO and RTO.
- Design backup protections.
- Run and record a restore exercise.