Skip to content

Lesson 3 of 13 · 16m

RPO and RTO Are Numbers, Not Vibes

RPO sizes your backup schedule and RTO sizes your restore path; both are derived from mechanism, not declared.

Every backup design reduces to two numbers, and most teams never compute either. RPO — recovery point objective — is how much data you can afford to lose, measured in time. RTO — recovery time objective — is how long the service can be down, measured in wall clock. Both are derived from the business and the mechanism, not declared in a meeting. The mechanism always wins.

RPO is set by your write path

RPO is not a preference; it is a bound on the interval between durable, restorable points in time. The write path decides it:

  • Nightly pg_dump at 02:00 gives RPO ≤ 24 hours. If the disk dies at 23:30, you lose the whole day's writes. If that is unacceptable, the schedule is wrong — not the luck.
  • Base backup plus continuous WAL archiving — archive_mode = on, archive_command shipping every segment — bounds loss to roughly the archive flush interval: minutes to seconds, plus whatever was in flight. The knob most setups forget is archive_timeout: Postgres archives a WAL segment when it fills or when the timeout trips, so on a quiet database your unshipped window silently stretches to however long 16 MB takes to accumulate. archive_timeout = 60 caps that window at a minute and forces partial segments into the archive.
  • Synchronous replication gives RPO ≈ 0 for infrastructure failure. It gives you nothing for logical damage: DROP TABLE commits and replicates instantly. Replication answers "the host died," not "the data was destroyed" — which is why point-in-time recovery remains mandatory even with a hot standby.

Derive the number from the data class. Orders and payments have an RPO near zero — losing confirmed transactions is money and disputes. Session data and analytics tolerate hours. Write the number per dataset; "the database" is not granular enough to design around.

RTO is set by your restore path

RTO is dominated by byte throughput and rebuild steps, and this is where fantasy numbers die. Do the arithmetic: 1 TB in S3 Standard restoring at a sustained 150 MB/s moves bytes for about 1.9 hours — before you provision the VM, reinstall the app, replay the WAL delta, run integrity checks, and flip traffic. Glacier-class retrieval adds hours of queueing before the first byte moves. A 4-hour RTO with a 2 TB database living only in object storage is not a plan; it is a hope with a logo on it.

The levers are unglamorous:

  • Keep a replica. A streaming standby or a recent local copy turns "restore" into "promote." You are buying RTO with replication, not backup — the backup still handles logical damage.
  • Pre-provision. A warm standby with data already present collapses RTO to promotion plus DNS. Cold standby (provisioned infra, data in storage) lands in between. Cold backup (everything in the repo, nothing provisioned) costs the least and takes the longest.
  • Measure the restore during a drill, because the restore path is where RTO actually lives. Throughput, rebuild steps, DNS propagation — the number on paper without a measured drill is fiction.

Where teams go wrong

The failure mode is picking aspirational numbers — "RPO 5 minutes, RTO 1 hour" — without checking whether any mechanism delivers them. Then the nightly dump violates the RPO by two orders of magnitude and nobody finds out until an incident. The other failure is uniform numbers: treating the upload bucket and the ledger with the same policy wastes money protecting replays of cat pictures with five-nines rigor.

RDS automated backups are the reference implementation of specificity: snapshot plus transaction logs give point-in-time recovery to any second inside the retention window, up to 35 days. That is what a computed RPO looks like when a provider actually commits to it — not "we back up regularly."

Set RPO from what a lost hour of writes costs. Set RTO from what a dead hour of service costs. Then verify each mechanism actually delivers its number — and write both numbers into the runbook next to the commands that satisfy them.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.