Stop 06 · Database ServicesTopics · 4/10

Database Backups & Snapshots

Part of the Cloud Computing Roadmap

In short

Someone runs DELETE without a WHERE clause. It happens to good engineers. Whether that's a five-minute fix or a career-defining disaster depends entirely on your backups and how well you know them.

Managed databases typically offer automated backups and point-in-time recovery — understanding retention settings and testing actual restores is essential, since an untested backup isn't a real safety net.

The blob character photographs a whiteboard full of diagrams with a phone.

Think of it like this

Photo of the whiteboard

Before the teacher wipes the board, you snap a photo. If you lose your notes, the photo brings back exactly what was there at that moment. Snapshots are photos of your database, and point-in-time restore is a video you can pause anywhere.

Watch it happen

Restoring to just before the mistake

Mon 02:00
0
Tue 02:00
1
Wed 02:00
2
Thu 02:00
3
Thu 10:41
4
Thu 10:42
5

1/5RDS takes a daily automated snapshot and also saves transaction logs every few minutes.

The big ideas

What you need to know

Automated backups

Daily snapshots plus logs, kept for a retention period you set (up to 35 days on RDS). Enables point-in-time restore.

Manual snapshots

Taken on demand, before risky changes. Kept until you delete them, even if the database is deleted.

Restore makes a new DB

Restores never overwrite the original. You get a fresh instance and then decide how to use it.

Copy elsewhere

Copy snapshots to another region or account so a regional issue or a compromised account can't destroy them.

See it in code

Walk through the code

bash
1# Before a risky migration, take a manual snapshot2aws rds create-db-snapshot \3  --db-instance-identifier notes-db \4  --db-snapshot-identifier notes-db-before-v25 6# Oops. Restore to one minute before the mistake (UTC)7aws rds restore-db-instance-to-point-in-time \8  --source-db-instance-identifier notes-db \9  --target-db-instance-identifier notes-db-restored \10  --restore-time 2026-10-29T05:11:00Z

1/2A named manual snapshot you can return to after a migration.

Times are in UTC. 10:41 in India (IST) is 05:11 UTC. Getting the time zone wrong restores the wrong moment.

Save yourself the pain

Common mistakes

Oops

Assuming backups work because the setting is on.

Do this instead

Restore a backup to a test instance every month and check the data. That's the only real proof.

Oops

Deleting a database and its automated backups together without a final snapshot.

Do this instead

Take a final snapshot when deleting. Automated backups are usually removed with the instance.

Your mission

Undo a disaster

~40 min

Quick check

A table was wiped at 15:30. The last snapshot was at 02:00. How do you lose the least data?

Go deeper

  1. 1Configure automated backups with a specific retention period on a sample database.
  2. 2Practice restoring a database from a snapshot to a new instance.
  3. 3Learn the difference between automated backups and manual snapshots, and when each is used.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge