Skip to content
atom®technologiesBook a call
Performance and reliability

How Often to Rehearse a Production Database Restore: Set the Cadence From a Measured Restore-Time SLO

Set a restore-time SLI and SLO, verify the PostgreSQL PITR WAL chain is continuous back to your base backup, and rehearse after material backup changes plus on an interval tied to your SLO review. Any specific interval is a proposal your own measurements must set.

A packed auditorium during a technology keynote

The direct answer

Do not pick a rehearsal interval from calendar habit. Set a measured restore-time SLI and an SLO for it, verify that your PostgreSQL PITR chain is continuous back to your base backup, and rehearse after any material change to backup or archiving plus on a fixed interval tied to your SLO review. A quarterly starting point is our proposal; your measured restore time against your SLO sets the actual cadence.

One caveat before the detail: the PostgreSQL documentation is vendor documentation describing how its continuous-archiving feature works, not an independent measurement of restore reliability. The Google SRE Book is a general reliability text, not a database recovery standard. Together they support the measurement principle and the PITR mechanics; neither prescribes a rehearsal frequency, and every cadence number in this article is labeled as a proposal.

The failure mode: an unrehearsed backup is an assumption

The decision is when to spend engineering time proving a restore works rather than assuming it does. The failure mode is quiet: nothing looks wrong until the day you need the restore. The PostgreSQL documentation on continuous archiving and point-in-time recovery states that PostgreSQL maintains a write ahead log in the pg_wal subdirectory that records every change made to the database's data files, and that this log exists primarily for crash-safety. Recovery by this method combines a file-system-level backup with archived WAL files, and the documentation states that successful recovery requires a continuous sequence of archived WAL files extending back at least as far as the start time of the base backup. Our inference from that requirement: a rehearsal that never checks the sequence tests less than it appears to, because the documented method depends on continuity back to the backup start. The documentation states the requirement; it does not enumerate the ways the sequence can break.

Two documented limits sharpen the risk. The PostgreSQL documentation states that pg_dump and pg_dumpall produce logical dumps, not file-system-level backups, and cannot be used as part of a continuous-archiving solution. If your recovery plan is a nightly logical dump plus an assumption that WAL replay covers the gap, the documentation says that combination does not work. The documentation also states that this method supports restoration of an entire database cluster, not a subset, and that it requires substantial archival storage, since the base backup might be bulky and a busy system generates many megabytes of WAL traffic that must be archived. A rehearsal that restores one table proves less than it seems to.

The documentation also advises setting up and testing the procedure for archiving WAL files before taking the first base backup. Our proposed extension of that setup-time advice into an ongoing cadence: if testing the chain matters before the first backup, treat it as mattering after every change to the chain as well.

Define the restore-time SLI and SLO first

The Google SRE Book chapter on service level objectives states that it is impossible to manage a service correctly, let alone well, without understanding which behaviors really matter for the service and how to measure and evaluate them. It defines an SLI as a carefully defined quantitative measure of some aspect of the level of service provided, and an SLO as a target value or range of values for a service level measured by an SLI. The chapter also states that choosing appropriate metrics helps drive the right action when something goes wrong and gives a team confidence that a service is healthy.

Applied to recovery, this is a proposed step: define the SLI as elapsed time from the restore decision to a verified database at the target recovery point, including the verification queries, not just process completion. Set the SLO as a target with a stated measurement window, the way the SRE Book structures its objectives. Without that number, the question of how often to rehearse has no answer, because there is nothing to compare a rehearsal result against.

The test that settles the cadence

We propose a rehearsal record with four entries: the measured restore time, the target recovery point you restored to, the result of a WAL continuity check back to the base backup, and the manual steps someone had to perform. Compare the measured time against the SLO and adjust. The SRE Book supports the comparison itself; it does not supply thresholds, and neither do we. Treat any trigger points as illustrative placeholders you must set from your own data: for example, you might decide that a rehearsal landing close enough to the SLO to worry you shortens the interval, and that several consecutive rehearsals landing comfortably inside the objective with few manual steps and no backup-stack changes justify lengthening it. The specific distances are yours to choose.

One proposed rule follows from the documented mechanics: rehearse after any material change to the base backup method, WAL archiving configuration, retention, storage location, or restore tooling, regardless of where you are in the calendar cycle. We also propose including a WAL continuity check in every rehearsal, because the PostgreSQL documentation makes a continuous WAL sequence back to the base backup start a requirement of the documented recovery method. We propose this as a check to run, not as a claim about which kind of change breaks the chain most often; the documentation ranks no such risks.

Growth changes the inputs

The PostgreSQL documentation's storage statements are the grounded part of this point: the base backup might be bulky, and a busy system generates many megabytes of WAL traffic that must be archived. A larger database therefore means more data to restore and more WAL to replay. Whether growth degrades your measured restore time, and by how much, is a hypothesis your rehearsals should measure; the sources in this article do not test that relationship. Our proposed operating rule follows: treat old measurements as stale under growth and re-measure rather than assuming a number from a much smaller database still holds.

Who owns the rehearsal work

The rehearsal needs an owner: someone who runs it, records the result, and answers for the comparison against the SLO. If your engineering manager can direct this work, developers in your team may fit: our engineers join your standups, tools and repositories and take direction from your engineering manager, priced per developer per month, for example a senior at $9,500, with a 3-month initial term and 30 days' notice to end. If nobody on your side can direct the work, a managed team run by our tech lead changes who directs it and who owns delivery quality: the tech lead talks with you daily, turns your priorities into a plan, and owns code review, quality and releases; you own the priorities and Atom owns delivery. A Starter managed team is $29,500 per team per month, with 30 days' notice to remove one person and 60 days to end the team. Under either model, the recovery objective and the SLO remain yours to set: the published division of responsibility puts delivery on Atom, not the definition of your recovery target.

Conditions that change the recommendation

Shorten the interval when measured restore time approaches the SLO, when backup or archiving changes are frequent, or when the database is growing quickly. Lengthen it only when repeated rehearsals show stable measurements well inside the objective and the change rate is low. As a proposed step, a change of database engine, backup tool or storage platform resets your evidence: rehearse once immediately, then re-baseline. If a rehearsal restores only a subset of the cluster, treat it as a partial test, because the PostgreSQL documentation states the continuous-archiving method restores the whole cluster, not a subset. And if you have never rehearsed, the first one is not a cadence decision at all; it is the test of whether you have a recovery plan or an assumption.