We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

RDS Backups

One is none, two is one.

Backups are important. We're going to break things in creative, irreparable ways from time to time, and RDS can automatically back up your database.

  • Daily backups: Taken during your preferred backup window (you can set this)
  • Transaction logs: Continuously backed up (enables point-in-time recovery)
  • Retention period: Configurable (1-35 days for most engines)
  • Storage: Backups stored in S3, separate from your database instance
  • Cost: Backup storage beyond the included allowance is billed separately

Cost check: RDS includes a backup storage allowance equal to your provisioned DB instance storage, shared by automated backups and manual snapshots. Storage beyond that allowance is billed. Backups retained after deleting a database can also incur charges, so clean up snapshots and retained backups when you're done with this project.

What's in a Backup?

RDS backups include:

  1. Database snapshots: Capture the state of your database at a point in time. The first snapshot is a full backup; subsequent snapshots store incremental changes.
  2. Transaction logs: All changes since the last backup (enables point-in-time recovery).

The combination of snapshots and transaction logs lets you restore to a specific time within your available retention window. Incremental storage means that keeping 7 days of backups for a 20 GB database doesn't automatically require 140 GB of backup storage. The amount depends on how much data is stored and how much changes between backups.

Restoring from Backups

You can restore your database in several ways.

Point-in-Time Recovery

Restore to any specific time within the retention period:

  • Uses a database snapshot + transaction logs
  • Can restore to the exact second before a data loss event
  • Useful when you know exactly when something went wrong

Restore from Snapshot

Restore to a specific backup snapshot:

  • Faster and simpler than point-in-time recovery
  • Useful for restoring to a known good state
  • You can also create manual snapshots at any time

Restore to New Instance

All restores create a new database instance:

  • Original instance remains unchanged
  • This means "restoring" is also useful for testing, cloning, or migration
  • You can restore to test changes before applying to production

Backups are the preferred method for cloning databases. Instead of exporting and importing data manually, just restore from a backup. It's faster, more reliable, and creates an exact copy. You don't even need the DB's credentials to migrate it.