Quick revision
The short answer
We automate scheduled restores of every critical database into an isolated environment, with integrity checks and row count comparisons, and record the actual RPO and RTO of each drill against targets agreed with the business. Larger game days rehearse full scenarios such as region loss, ransomware and accidental deletion. Backups are made immutable or kept in a separate account, results go to leadership, and a failed drill is treated as an incident.
What to remember
In this answer, we turned an audit finding into a routine. We automated scheduled restores of every critical database into isolated environments with integrity checks and row count comparisons, measured actual RPO and RTO against targets agreed with the business, ran game days for region loss, ransomware and accidental deletion, protected backups with immutability and separate accounts, and reported results to leadership, treating failed drills as incidents.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
We automate scheduled restores of every critical database into an isolated environment, with integrity checks and row count comparisons, and record the actual RPO and RTO of each drill against targets agreed with the business. Larger game days rehearse full scenarios such as region loss, ransomware and accidental deletion. Backups are made immutable or kept in a separate account, results go to leadership, and a failed drill is treated as an incident.
Why this question is asked
An audit finding that backups were never restored is alarming because it means the company does not know whether it can recover. Backups fail silently in many ways: archiving that stopped months ago, missing encryption keys, retention rules that deleted the copy we needed, or a restore that works but takes three days. Interviewers ask this leadership question to see whether we can turn a one-off scare into a routine that keeps proving recovery works, and report it in terms the business understands. In this answer, we will see why untested backups are a risk, build automated restore drills, measure RPO and RTO, add game days for whole scenarios, protect the backups themselves, and set up reporting.
1Why an Untested Backup Is Only a Hope
A backup job that reports success only tells us that some files were written. It does not tell us that the files are complete, that the WAL archive has no gaps, that someone can find the decryption key, or that the restored database starts and contains the right data. Many teams discover these problems for the first time during a real incident, which is the worst possible moment.
So the goal is not 'run a test restore once' to satisfy the audit. It is to make restoring a routine, automated activity that runs often enough that a broken backup is found within days, and that produces evidence anyone can read: this database, restored on this date, to this point in time, in this many minutes, with these checks passed.
2Automated Restore Drills
We start with an inventory of databases ranked by criticality, because we cannot drill everything on day one. For each critical database, a pipeline runs on a schedule, weekly for the most critical and monthly for the rest. It provisions an isolated environment, a separate network or account with no route to production, so a restored copy can never be mistaken for production or send emails to real customers. It then restores the latest backup and replays WAL to a target time a few hours earlier.
After the restore, the pipeline runs checks. The database must start cleanly. Integrity checks, such as pg_amcheck for PostgreSQL indexes, must pass. Row counts of key tables must match what production had at the target time, within a small tolerance; we capture those counts from production on a schedule so there is something to compare against. A few application-level queries, such as 'the latest order before the target exists', prove the data is usable, not just present. Finally the environment is destroyed, because restored copies of production data are themselves sensitive.
- Pick database and target timefrom the criticality inventory
- Provision isolated environmentno route to production
- Restore backup and replay WALrecord start and end times
- Run checksstart-up, pg_amcheck, row counts, sample queries
- All checks passed within RTO?compare with agreed targetsYesRecord success and destroy copyNoOpen an incident
- Publish resultdashboard and monthly report
6 steps in order. Play them, or step through them one at a time.
3Measuring Actual RPO and RTO
RPO, the recovery point objective, is how much data the business accepts losing; RTO, the recovery time objective, is how long it accepts being down. These are business decisions, so we agree them with the owners of each system: perhaps 5 minutes and 1 hour for payments, 24 hours and 8 hours for an internal reporting tool. Engineering's job is to measure whether we meet them.
Each drill measures both. Actual RTO is the clock time from starting the restore to passing the checks, broken into provisioning, copying, WAL replay and validation, so we know which part to speed up. Actual RPO is the gap between the latest point we could restore to and the time we asked for, which reveals archiving delays. If the payments database restores in 3 hours against a target of 1, that is a finding with a clear fix: more frequent base backups, faster restore storage, or a standby that can be promoted.
| Database | Target RPO / RTO | Measured RPO / RTO | Status |
|---|---|---|---|
| payments | 5 min / 1 h | 1 min / 52 min | met |
| orders | 5 min / 2 h | 1 min / 3 h 10 min | RTO missed |
| customer-profile | 15 min / 4 h | no WAL after 3 days ago | failed, incident |
| reporting | 24 h / 8 h | 20 h / 2 h | met |
4Game Days for Whole Scenarios
Restoring one database proves the backup works. It does not prove that the company can recover from a real disaster, where several systems are down together, people are stressed, and some tools themselves are unavailable. So a few times a year we run game days: rehearsals of whole scenarios. Losing a region means restoring several databases in another region in the right order. Ransomware means assuming the main backup system is also compromised and recovering from the isolated copies. Accidental deletion means recovering one table with point-in-time recovery without disturbing the rest.
Game days find the problems that automation misses: a runbook step that needs an engineer who has left, a dependency between services that nobody wrote down, permissions that only exist in the region we just lost. Each finding gets an owner and a date.
5Protecting the Backups and Reporting Results
A drill programme is worthless if an attacker or a mistake can delete the backups. So backups of critical databases are made immutable, for example with object lock on cloud storage in compliance mode, so that nobody, including administrators, can delete them before the retention period ends. A copy also goes to a separate account with separate credentials, so one compromised account cannot destroy both production and its backups.
Results go to leadership regularly, as a simple page: how many critical databases were drilled this month, how many met their RPO and RTO, and what failed. A failed drill is treated like a production incident, with an owner, a timeline and a review, because it is one: it shows that, had the disaster been real, we would not have recovered in time. This framing is what keeps the programme funded after the audit pressure fades.
6Follow-up questions
How often should restore drills run?
As often as our tolerance for undetected backup failure. Weekly for the most critical databases means a broken backup is found within a week; monthly may be enough for less critical systems. Automation makes frequent drills cheap, so the limit is usually cost of the temporary infrastructure, not effort.
How do you handle very large databases in drills?
We still restore them fully, at least periodically, because that is what measures the real RTO. Between full drills we can restore a subset, such as a few tables or a sampled check, and we schedule the big restores where temporary capacity is cheap.
What do you do about personal data in restored copies?
Restored copies stay in an isolated, access-controlled environment and are destroyed when the checks finish. If teams want restored data for testing, it goes through a masking step first; drill environments are not a source of test data.
7Conclusion
In this answer, we turned an audit finding into a routine. We automated scheduled restores of every critical database into isolated environments with integrity checks and row count comparisons, measured actual RPO and RTO against targets agreed with the business, ran game days for region loss, ransomware and accidental deletion, protected backups with immutability and separate accounts, and reported results to leadership, treating failed drills as incidents.
Open with
I would treat it as an unknown recovery capability and make restoring routine rather than a one-off. First, rank databases by criticality and agree RPO and RTO targets with the business owners, because those are business decisions.
Then, if they want more
Then build an automated pipeline that, on a schedule, weekly for the most critical, restores the latest backup into an isolated environment with no route to production, replays WAL to a target time, and runs checks: the database starts, integrity checks like pg_amcheck pass, row counts of key tables match production's recorded counts, and a few application queries work.
Each drill records actual RPO and RTO, broken into provisioning, copy, replay and validation, so we know what to speed up. A few times a year we run game days for whole scenarios like region loss, ransomware and accidental deletion, because they find the missing permissions and undocumented dependencies.
I would make critical backups immutable, with object lock and a copy in a separate account with separate credentials. And I would report drill results to leadership monthly and treat a failed drill as an incident with an owner, because it means we could not have recovered.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- PostgreSQL documentation, MySQL reference manual
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "An audit finds that most of your company's database backups have never been...": https://scrivio-interview-library.netlify.app/databases/database-operations/eb71d47f1d/