How does RDS point-in-time recovery work, and when should you use it?
By the Keel team · Last checked · 5 min read
Short answer
RDS point-in-time recovery lets you restore a database to any second inside your backup retention period, which can be set up to 35 days. It always creates a new instance and leaves the original untouched, so you can recover or copy back just the damaged data. The latest restorable time trails the clock by about five minutes.
35 days
Longest backup retention period you can set on an RDS DB instance
Source: AWS docs, Nov 2026
About 5 minutes
How far the latest restorable time trails the clock, as logs upload to S3
Source: AWS docs, Nov 2026
How does RDS point-in-time recovery work?
RDS point-in-time recovery restores your database to a chosen moment inside the backup retention period, as a new DB instance.
RDS point-in-time recovery restores your database to a chosen moment within the backup retention period, by creating a new DB instance. The source instance is not modified, and you give the new one a unique identifier.
Automated backups take a snapshot of the whole instance during the backup window, and RDS uploads transaction logs to Amazon S3 about every five minutes. That is why the latest restorable time trails the current time by roughly that interval. You can read it from the LatestRestorableTime field.
aws rds describe-db-instances \
--db-instance-identifier my-prod-db \
--query 'DBInstances[0].LatestRestorableTime'
aws rds describe-db-instance-automated-backups \
--db-instance-identifier my-prod-db \
--query 'DBInstanceAutomatedBackups[0].RestoreWindow'When should you use point-in-time recovery?
Use it when the data is wrong rather than the server being down, such as a bad delete or a corrupting migration.
Use it when the data is wrong rather than the server being down: a bad DELETE or UPDATE, a migration that corrupted rows, or a need to see what the data looked like just before an incident. These are the failures a Multi-AZ standby cannot help with, because it copies mistakes instantly.
- A script ran against production instead of staging.
- A migration changed or dropped more than intended.
- A bug slowly wrote bad values and you have found it late.
- You need evidence of the state at a specific time for a customer or an audit.
The sooner you notice, the less you lose. See is RDS Multi-AZ worth it for what the standby does cover.
How do you use it during an incident?
Note the time just before the bad change in UTC, restore to a new instance, check it, then switch over or copy data back.
Note the exact time just before the bad change in UTC, restore to a new instance at that time, check it, then either switch the app over or copy the damaged data back. Keep the original instance until you are sure nothing is missing.
aws rds restore-db-instance-to-point-in-time \
--source-db-instance-identifier my-prod-db \
--target-db-instance-identifier my-prod-db-recovery \
--restore-time 2026-11-10T14:32:00Z \
--db-instance-class db.m6g.large \
--vpc-security-group-ids sg-0123456789abcdef0 \
--db-parameter-group-name my-prod-paramsMatch the source instance class, and IOPS if you use Provisioned IOPS, or the restore can fail. To restore to the latest possible moment, use --use-latest-restorable-time instead of --restore-time.
A restored instance uses the default parameter and option groups unless you name your own, and you choose its security groups, so set them in the command. The volumes also keep loading data from S3 in the background after the instance becomes available, so expect it to be slower at first. How long an RDS restore takes covers timing.
How do you copy just the damaged rows back?
Restore to a new instance, export only the affected rows and load them into production inside a transaction.
Restore to a new instance, connect to it read-only, export only the affected rows, and write them into production inside a transaction. This keeps everything written since the incident, which switching the whole app to the restored copy would lose.
- Restore to the moment before the incident.
- Connect to the restored instance and export the affected rows, for example with
\copyorpg_dump --data-only -t table_name. - Compare them with production to see what changed since.
- Load them into production in a transaction, resolving conflicts deliberately.
- Ask the people who reported the problem to confirm the result.
Switching the app to the restored instance is simpler when the whole database is damaged and little has been written since. Copying rows wins when the damage is narrow.
How far back can you go, and what does it cost?
You can go back as far as your backup retention period, which AWS lets you set from 0 to 35 days on a DB instance.
You can go back as far as your backup retention period, which AWS lets you set from 0 to 35 days on a DB instance. The default is 1 day when you create an instance through the CLI or API and 7 days in the console, so check yours.
- Setting retention to 0 disables automated backups, and changing between 0 and a nonzero value causes an outage.
- If you delete an instance, automated backups go with it unless you choose to retain them. Final and manual snapshots are separate.
- Each Region gets free backup storage equal to 100% of your total provisioned database storage, then you pay for the rest.
- Time spent in the stopped state does not count towards retention.
Pick retention by how long it might take you to notice a problem, not by habit. A bug that corrupts data slowly can outlast seven days. For longer history, take manual snapshots, which AWS says are independent of automated backups.
aws rds modify-db-instance \
--db-instance-identifier my-prod-db \
--backup-retention-period 14 \
--apply-immediatelyWhat about several databases, or an instance in an AWS Backup plan?
Restore several instances to the same UTC timestamp so their data stays consistent with each other.
If your product uses several RDS instances, restore them all to the same UTC timestamp so their data stays consistent with each other. One instance restores all its databases together, because its backups cover the whole instance, not individual databases.
If an instance is in an AWS Backup plan, AWS says that plan is used for point-in-time recovery, so check the plan's retention as well as the instance setting. What AWS Backup restore testing misses explains why a green job is not a tested restore.
Write the multi-database timestamp rule into your runbook and practise it. It is easy to get wrong under pressure.
How do you know it will work when you need it?
Run a point-in-time restore on a schedule and record how long it took, because that is your real recovery time.
Run a point-in-time restore on a schedule and record how long it took, because that number is your real recovery time. Testing an RDS restore step by step walks through the routine and how often to test database restores suggests a rhythm.
Could you recover from a bad change?
Tick each item that is true today.
- Backup retention is set deliberately, not left at a default.
- You know your database's latest and earliest restorable times.
- You have done a point-in-time restore to a scratch instance this quarter.
- The restore command sets instance class, security groups and parameter groups.
- Your runbook says who decides between switching over and copying rows back.
Decision point: Five ticks: you can recover from a bad change calmly. Two or fewer: point-in-time recovery exists, but you have not shown it works.
Sources
- AWS docs, Restoring a DB instance to a specified time for Amazon RDS (checked October 2026)
- AWS docs, Backup retention period (checked November 2026)
- AWS docs, Introduction to backups for Amazon RDS (checked October 2026)
Keep reading
Keel is an AWS release and recovery operations service for SaaS teams of 3 to 15 developers, provided by Bargainn Services Ltd, a UK company registered at Companies House (16497746). Registered office: 3rd Floor, 86-90 Paul Street, London, EC2A 4NE, United Kingdom.