How does Amazon RDS backup/snapshot actually work?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Overview
Amazon Relational Database Service (RDS) provides two powerful options for backing up your databases: automated backups and database snapshots. Both are integral to ensuring data durability and facilitating recovery, but they operate in different ways. This article delves into the mechanisms of each, clarifying their operations and use-cases, which enables database administrators to make well-informed decisions about data protection in the AWS cloud.
Automated Backups
Automated backups allow you to recover your database to any point in time within a retention period. This feature is crucial in production environments, where minimal data loss is a priority.
How It Works
- Retention Period Management: By default, Amazon RDS retains automated backups for seven days, but this can be configured. The retention period can be modified up to a maximum of 35 days.
- Storage and Cost: The storage for automated backups is provided at no additional cost up to the size of your primary DB instance.
- Backup Initiation: Backups are initiated during a 30-minute window defined by the user. During this period, RDS performs a storage volume snapshot and backs up transaction logs.
- Incremental Backups: After the initial full snapshot, automated backups are incremental. This means that only the data that has changed since the last backup will be saved in subsequent backups.
- Point-in-Time Recovery (PITR): With transaction logs continuously archived, assuming backups are taken with this in mind, database recovery to any specific time can be achieved within the retention window.
Example
Suppose you have a database with 100 GB of storage. RDS will handle the initial full snapshot of 100 GB, and if your daily changes are about 1 GB, the daily incremental backup will occupy 1 GB each day.
Manual Snapshots
Snapshots are similar to automated backups, but they are initiated manually and can retain data beyond the typical automated backup retention periods.
How It Works
- User-Initiated: Manual snapshots can be created at any time and are initiated by the user via the AWS Management Console, CLI, or API.
- Storage: Unlike automated backups, storage for snapshots does incur charges based on the data size.
- Persistency: Snapshots remain until explicitly deleted, providing users with long-term data storage options.
- Use in Restorations: When restoring from a snapshot, a new RDS instance is created with the data contained in the snapshot, effectively providing a clone of the original database at the time the snapshot was taken.
Example
For periodic archiving, you might take a manual snapshot every month and retain these snapshots indefinitely for audit purposes, or financial year tracking. If your original data size is 200 GB, each of these snapshots will account for this much storage.
Recovery
Both automated backups and manual snapshots can be utilized for recovery purposes. Restorations involve either creating a new database instance from a snapshot or recovering to a specific point in time when using automated backups.
Recovery Process
- Automated Recovery: Select the point in time to restore, choose the instance settings, and initiate the recovery. This involves recovering from the combination of the last full snapshot and the necessary transaction logs.
- Snapshot Recovery: Choose the snapshot from which to restore and configure the instance parameters for the new database.
Cost Considerations
The costs associated with RDS backups and snapshots differ:
- Automated Backups: Free storage up to the size of the provisioned database instance. Additional charges apply for storage beyond this size.
- Manual Snapshots: Charged based on the size of the data stored in the snapshot.
Summary Table
| Feature | Automated Backups | Manual Snapshots |
| Initiation | Configured retention period, managed by AWS User-defined backup windows | User-initiated, via Console/CLI/API |
| Retention | Up to 35 days | Indefinite, until explicitly deleted |
| Storage Cost | Free up to DB size | Charged based on snapshot data size |
| Incremental | Yes | No |
| Purpose | Routine backups, point-in-time recovery | Long-term retention, archival |
| Restoration | Can recover to a point-in-time within retention | Creates a new DB instance |
Best Practices
- Determine Retention Needs: Configure your backup retention periods according to the RPO (Recovery Point Objective) of your business.
- Use of Snapshots for Longer Terms: For applications requiring long-term data retention or periodic archiving, employ manual snapshots.
- Monitor Storage Costs: Regularly review the cost associated with snapshots and clean up unnecessary data to minimize expenses.
- Testing Recovery Procedures: Regularly test recovery procedures from snapshots and backups to ensure business continuity.
Understanding how Amazon RDS backups and snapshots work will greatly enhance your data management strategy, ensuring your databases are reliably safeguarded against accidental loss or system failures.
Related reading
- How does Auto Scaling place instances when used with multiple availability zones?
- How does AWS DynamoDB count read units for Query?
- How does AWS FIFO SQS deduplication ID work?
- How does aws s3 sync determine if a file has been updated?
- How does Apache Cassandra do aggregate operations?
- How does Cassandra Partitioning actually work?
- How does google prediction API work
- How does k8s service route the traffic to mulitiple endpoints

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.