Cloud & Virtualization

RPO and RTO Explained: Setting Realistic Recovery Targets

By NileVPS Team · Published · 5 min read

اقرأ المقال بالعربي

When something breaks badly, two questions matter most: how much data did we lose, and how long until we are back? RPO and RTO are the answers you agree on before the incident. Without them, "we have backups" can mean anything from "we restore last night's dump in ten minutes" to "someone copied the database to a laptop in March". This article explains both terms and maps them to techniques you can run on a VPS.

The definitions

RPO (Recovery Point Objective) is the maximum amount of data, measured in time, that you are willing to lose. If your RPO is one hour, then after any failure you must be able to restore to a point no more than one hour before it. RPO looks backwards from the incident.

RTO (Recovery Time Objective) is the maximum time the service may be unavailable, measured from the start of the outage until users can work again. RTO looks forward from the incident.

A simple timeline makes it clear:

last good backup ---- [RPO window] ---- FAILURE ---- [RTO window] ---- service restored

Everything written in the RPO window may be lost. Everything in the RTO window is downtime.

Why the two are independent

People often assume a short RPO means a short RTO, but they are driven by different things. RPO depends on how often you capture data. RTO depends on how fast you can rebuild and switch over. A nightly backup restored by a fully scripted process gives a poor RPO (up to 24 hours of loss) but possibly a good RTO (30 minutes). Continuous database replication with no runbook gives an excellent RPO but a terrible RTO if nobody knows how to promote the replica.

Choosing the right values

Do not start with technology; start with the cost of loss and downtime. For each service, ask:

  1. What happens to the business for each hour the service is down? Lost sales, idle staff, broken promises to customers?
  2. What data is created between backups, and can it be recreated? Orders and payments usually cannot; analytics events often can.
  3. Are there contractual or legal obligations?

Then group services into tiers:

TierExampleTypical RPOTypical RTO
CriticalCheckout, payments, user accountsMinutesUnder 1 hour
ImportantMain website, customer dashboard1-4 hoursA few hours
StandardInternal tools, staging, reports24 hours1-2 days

These figures are starting points for discussion, not industry rules. The point is that not everything needs the most expensive treatment.

Techniques that meet each RPO

Target RPOApproach on a VPS
24 hoursNightly pg_dump / mysqldump plus file backup, copied off-site
1 hourHourly dumps for small databases, or frequent incremental file backups with restic or Borg
MinutesContinuous WAL archiving for PostgreSQL (for example with pgBackRest or WAL-G), or MySQL binary logs shipped off-site, enabling point-in-time recovery
Near zeroStreaming replication to a standby server in another location

Point-in-time recovery is often the best value for databases. In PostgreSQL the basic idea is to take a periodic base backup and archive every WAL segment:

# postgresql.conf
wal_level = replica
archive_mode = on
archive_command = 'pgbackrest --stanza=main archive-push %p'

With that in place you can restore to a specific moment, such as one minute before someone ran a bad DELETE.

Note that replication protects against server loss but not against mistakes: a dropped table is replicated instantly. Keep backups even when you have replicas.

Techniques that meet each RTO

RTO is mostly about preparation and automation:

  • Days: manual rebuild from documentation. Acceptable only for low tiers.
  • Hours: a tested runbook, backups in a known location, and a fresh VPS you can create quickly from the deploy page.
  • Under an hour: scripted provisioning (cloud-init, Ansible or a shell script), restore scripts, and low DNS TTLs so traffic can move fast.
  • Minutes: a warm standby that already runs the application, plus a tested failover procedure or a load balancer that removes the failed server automatically.

Do not forget the human part of RTO: noticing the outage, reaching the right person and deciding to fail over can take longer than the technical restore. Monitoring with alerts shortens this stage.

Measuring your real numbers

Targets are only promises until you test them. During a restore drill, record:

  • Actual RPO: the timestamp of the newest data in the restored copy compared with the moment of the simulated failure.
  • Actual RTO: the time from "start" to "users can log in and work".

If the measured values miss the targets, either invest in faster techniques or agree on more realistic targets. Both are valid; pretending is not. Our guide to disaster recovery planning describes how to run such a drill.

FAQ

Can RPO be zero?

In practice true zero is very hard. Synchronous replication can come close for server failures, because a write is confirmed only after the standby receives it, but it adds latency and still does not protect against logical errors like an accidental delete. Most projects choose a small, non-zero RPO plus point-in-time recovery.

Is RTO the same as an uptime SLA?

No. An SLA describes availability over a period, such as a month, and may include compensation terms. RTO is your own target for recovering from a single incident. A provider's SLA covers its infrastructure, while your RTO also covers your application, data and procedures.

How do snapshots fit into RPO and RTO?

A snapshot gives an RPO equal to the time since it was taken and usually a fast RTO for rolling back on the same platform. Because snapshots are typically taken on demand or on a schedule rather than continuously, they work best as one layer alongside database backups.

Related guides