Study guide
Technical reference and lesson notes
Purpose of This Lesson
Amazon RDS provides two primary backup mechanisms: automated backups and manual snapshots. Understanding how they differ is essential for designing point-in-time recovery, long-term retention, cross-Region disaster recovery, and operational maintenance strategies for the SAP-C02 exam.
This lesson also covers Aurora backup behavior, which differs from standard RDS DB instances because backups are continuous, incremental, and managed at the DB cluster level.
Key Concepts
RDS automated backups
Automated backups combine a periodic backup with transaction logs:
- A backup is created during the configured backup window.
- Transaction logs are continuously captured and uploaded approximately every five minutes.
- During recovery, RDS restores the backup and replays transaction logs to reach a selected point in time.
- The backup retention period is configurable from
0to35days. - A retention period of
0disables automated backups. - Automated backups require the DB instance to be in the
availablestate.
The backup window should be selected carefully. Backup initiation can cause a brief I/O interruption and may place some additional load on the database. A low-traffic period is generally the preferred choice.
Point-in-time recovery
You can restore an RDS DB instance to any supported point in time within its automated backup retention period. The available recovery range extends from the earliest retained backup through the latest point for which transaction logs are available.
A restore does not overwrite the existing DB instance. RDS creates a new DB instance with:
- A new DB instance identifier, if one is selected
- A different database endpoint
- The default DB parameter group and option group unless alternatives are specified or changed afterward
Applications may therefore require a connection update, DNS change, or other endpoint-redirection mechanism after recovery.
Manual DB snapshots
Manual snapshots are user-initiated backups that remain available until explicitly deleted. They are not governed by the automated backup retention period.
For standard RDS deployments:
- A snapshot captures the entire DB instance, including all databases hosted by that instance.
- Manual snapshots are suitable for long-term retention.
- Snapshots consume storage and can incur charges.
- Snapshot creation may briefly suspend I/O depending on the engine and deployment configuration.
For Multi-AZ deployments, snapshot impact depends on the engine. For MariaDB, MySQL, Oracle, and PostgreSQL, RDS can take the snapshot from the standby. Multi-AZ SQL Server behavior can include a brief suspension of I/O on the primary node.
RDS maintenance windows
The maintenance window is separate from the backup window. It defines when RDS can perform operating system and database maintenance, including patching.
Maintenance may require the DB instance to be temporarily taken offline or otherwise experience disruption. Configure the window during a period that minimizes business impact, and do not confuse it with the time reserved for automated backups.
Cross-Region backup copies
Automated backups can be configured for replication to another AWS Region where supported. Cross-Region backup copies provide protection against a complete Regional outage and allow the database to be restored in the destination Region.
A cross-Region copy is not the same as a failover. Recovery requires restoring a DB instance in the destination Region and updating application connectivity.
Aurora backups
Aurora uses a different backup model from standard RDS DB instances:
- Backups are continuous and incremental.
- Point-in-time recovery is available within the configured retention period.
- The default Aurora backup retention period is one day.
- Automated backups cannot be disabled for an Aurora DB cluster.
- Backup retention is managed at the DB cluster level.
- AWS Backup can also be used to manage Aurora backups.
Aurora manual snapshots represent the entire DB cluster rather than a single DB instance. Like RDS manual snapshots, Aurora manual snapshots do not expire automatically.
Aurora automated backups and manual DB cluster snapshots can be copied within the same Region or across Regions, including shared snapshots where applicable. For long-term archival or analysis, snapshot data can be exported to Amazon S3.
Aurora automated backup deletion
Aurora automated backups are removed when:
- The retention period expires
- Automated backups are disabled, where applicable to the relevant configuration
- The DB cluster is deleted
If a backup must be retained beyond the automated retention period or after cluster deletion, create or retain a manual DB cluster snapshot before deleting the cluster.
Exam-Relevant Takeaways
- Automated backups support point-in-time recovery; manual snapshots restore to the snapshot’s creation state.
- RDS automated backup retention is
0–35 days;0means automated backups are disabled. - Manual snapshots do not expire automatically and are appropriate for long-term retention.
- Restoring an RDS backup creates a new DB instance and a new endpoint.
- The DB instance must be
availablefor automated backups to run. - Backup and maintenance windows are separate settings with different purposes.
- Cross-Region backup copies improve disaster recovery for Regional failures, but they do not provide automatic application failover.
- Aurora backups are continuous and incremental, cannot be disabled, and are managed at the cluster level.
- Aurora snapshots cover the DB cluster, not merely one database instance.
- Use a manual snapshot when an automated backup must be preserved beyond its retention period.
Architecture Decision Guide
| Requirement | Preferred mechanism | Important consideration |
|---|---|---|
| Recover from accidental data changes to a recent point in time | RDS automated backup or Aurora point-in-time recovery | Recovery is limited to the configured retention period |
| Retain a database backup indefinitely | Manual RDS snapshot or Aurora manual DB cluster snapshot | Snapshots persist until deleted and incur storage charges |
| Protect against a Regional outage | Cross-Region automated backup replication or snapshot copy | Restore in the destination Region and redirect clients |
| Restore an RDS database to a new environment | Manual snapshot restore | A new DB instance and endpoint are created |
| Minimize backup impact on a single-AZ instance | Schedule the backup window during low activity | Backup initiation can briefly interrupt I/O |
| Protect an Aurora cluster continuously | Aurora automated backups | Retention is configured at the cluster level and cannot be disabled |
| Preserve Aurora data for long-term external retention | Export snapshot data to Amazon S3 | S3 becomes an additional storage and lifecycle-management concern |
| Apply operating system or database patches | RDS maintenance window | This is distinct from the backup window and may cause downtime |
Common Exam Traps
- Confusing snapshots with point-in-time recovery: A manual snapshot represents a specific recovery state. Automated backups use transaction logs to support recovery to a selected point in time.
- Assuming restore replaces the failed instance: RDS creates a new DB instance. The endpoint changes unless the architecture uses an abstraction such as DNS or a proxy layer.
- Treating a manual snapshot as automatically expiring: Manual snapshots remain until deleted, regardless of the automated backup retention period.
- Setting retention to zero and expecting snapshots to remain: Setting RDS automated backup retention to
0disables automated backups. Existing manual snapshots are unaffected. - Confusing the backup window with the maintenance window: Backups and patching are controlled by separate windows.
- Assuming Multi-AZ eliminates backup requirements: Multi-AZ improves availability and failover but is not a substitute for backups or point-in-time recovery.
- Assuming cross-Region copies fail over automatically: Cross-Region backups improve recovery capability but still require restoration and application endpoint changes.
- Applying instance-level RDS behavior to Aurora: Aurora backup retention and snapshots are cluster-oriented, and Aurora automated backups cannot be disabled.
- Forgetting that Aurora automated backups are temporary: To preserve data beyond the retention period or cluster deletion, use a manual snapshot or another supported export/backup strategy.
Real-World Engineer Notes
- Schedule backup and maintenance windows based on measured workload patterns rather than choosing an arbitrary overnight period. Global applications may require a window that is quiet for the specific Region and workload.
- Test restores regularly. A configured backup policy is not proof that the application can recover within its RTO.
- Treat the post-restore endpoint as a deployment concern. Route applications through controlled configuration, DNS, or a connection-management layer so recovery does not require code changes.
- Use automated backups for operational recovery and manual snapshots for release checkpoints, migrations, major schema changes, and long-term retention.
- Cross-Region backups address Regional durability, but a complete disaster recovery design also needs infrastructure automation, secrets, networking, monitoring, and a documented restoration process in the secondary Region.
- Delete obsolete manual snapshots deliberately. Their persistence is useful for compliance and rollback, but uncontrolled snapshot growth increases cost.
- Keep backup and maintenance windows separate operationally. A patching event and a backup event may have different performance and availability consequences.
Quick Reference Summary
- Automated RDS backup: Backup plus transaction logs; enables point-in-time recovery.
- RDS retention:
0–35 days;0disables automated backups. - Manual snapshot: Entire RDS DB instance; does not expire automatically.
- Restore behavior: Creates a new DB instance with a new endpoint.
- Backup prerequisite: DB instance must be
available. - Backup window: Controls automated backup timing.
- Maintenance window: Controls patching and maintenance timing.
- Cross-Region protection: Copy or replicate backups and restore in another Region.
- Aurora automated backup: Continuous, incremental, cluster-level, and cannot be disabled.
- Aurora manual snapshot: Entire DB cluster; persists until deleted.
- Long-term retention: Use manual snapshots or export supported snapshot data to Amazon S3.
Flashcards
- Q: What is the difference between an RDS automated backup and a manual snapshot?
A: Automated backups use a backup plus transaction logs for point-in-time recovery within the retention period. Manual snapshots are user-created backups retained until deleted.
- Q: What is the valid automated backup retention range for an RDS DB instance?
A: Zero through 35 days. A value of zero disables automated backups.
- Q: What happens when an RDS DB instance is restored from backup?
A: RDS creates a new DB instance with a new endpoint; it does not overwrite the original instance.
- Q: What does RDS use to support point-in-time recovery between snapshots?
A: Transaction logs uploaded approximately every five minutes.
- Q: In what state must an RDS DB instance be for automated backups to occur?
A: The instance must be in the available state.
- Q: Do RDS manual snapshots expire according to the automated backup retention period?
A: No. They remain until explicitly deleted.
- Q: What is the purpose of the RDS maintenance window?
A: It defines when operating system and database maintenance, including patching, can occur.
- Q: Can Aurora automated backups be disabled?
A: No. Aurora automated backups are always enabled and managed at the DB cluster level.
- Q: What is the default Aurora backup retention period?
A: One day.
- Q: What does an Aurora manual snapshot contain?
A: The entire Aurora DB cluster.
- Q: Why copy backups to another AWS Region?
A: To provide recovery capability if the primary Region becomes unavailable.
- Q: Does a cross-Region backup copy automatically redirect application traffic?
A: No. The database must be restored in the destination Region and application connectivity must be redirected.
Practice Questions
Question 1
A company runs an Amazon RDS for PostgreSQL DB instance. An administrator accidentally deletes important rows at 14:22. The company has automated backups configured with a seven-day retention period. What is the most appropriate recovery approach?
A. Restore the latest manual snapshot and accept its older state
B. Use point-in-time recovery to create a new DB instance just before 14:22
C. Increase the backup retention period and immediately recover the deleted rows
D. Fail over to the Multi-AZ standby
Correct answer: B
Explanation: Automated backups and transaction logs support point-in-time recovery. RDS creates a new DB instance, so the application must connect to the restored endpoint or use an endpoint-redirection strategy. Multi-AZ failover does not recover logically deleted data.
Question 2
A database team must retain the state of an RDS DB instance before a major schema migration for at least two years. Which solution best meets the requirement?
A. Set automated backup retention to 35 days
B. Create a manual DB snapshot before the migration
C. Disable automated backups during the migration
D. Rely on the Multi-AZ standby
Correct answer: B
Explanation: Manual snapshots do not expire automatically and are appropriate for long-term retention. The snapshot should be managed and deleted according to the organization’s retention and cost policies.
Question 3
An organization needs to recover an Aurora database after an accidental update. The recovery point may be any time during the previous 24 hours. Which Aurora capability should be used?
A. Restore the most recent manual snapshot only
B. Aurora point-in-time recovery using continuous automated backups
C. Restore an RDS DB instance snapshot
D. Fail over to a reader endpoint
Correct answer: B
Explanation: Aurora automated backups are continuous and incremental, enabling point-in-time recovery within the configured retention period. A reader endpoint provides read access and is not a mechanism for reversing data changes.
Question 4
A company wants protection if an entire AWS Region becomes unavailable. It runs an RDS DB instance in the primary Region and has a 14-day automated backup retention period. Which additional design is most appropriate?
A. Add a read replica in the same Availability Zone only
B. Configure supported automated backup replication or copy backups to another Region
C. Increase the backup window duration in the primary Region
D. Create a second DB parameter group
Correct answer: B
Explanation: Cross-Region backup protection allows the database to be restored in another Region after a Regional failure. The recovery plan must also include infrastructure provisioning and application endpoint redirection.
Question 5
An operations team wants to avoid backup-related workload impact during peak business hours and also needs a separate period for database patching. Which configuration should it use?
A. Configure only a maintenance window
B. Configure only a backup window
C. Configure a low-traffic backup window and a separate maintenance window
D. Disable automated backups and use Multi-AZ failover for recovery
Correct answer: C
Explanation: RDS exposes separate backup and maintenance windows. The backup window controls automated backups, while the maintenance window controls patching and other maintenance that may require disruption.