Database Backup and Point-in-Time Recovery with RDS
Create manual RDS snapshots, configure automated backups, and perform point-in-time recovery to restore databases to any second within the retention window.
Prerequisites
- -AWS CLI v2 installed and configured
- -Existing RDS database instance
- -IAM permissions for RDS snapshot operations
Steps
Create a manual snapshot
Take an immediate snapshot of the RDS instance to capture the current state of the database before making changes.
Always create a manual snapshot before schema migrations or major updates. Manual snapshots persist until you explicitly delete them, unlike automated backups.
Wait for the snapshot to complete
Monitor the snapshot creation progress and wait until it reaches the available state.
Snapshot creation time depends on database size and can take from minutes to hours for large databases. The database remains available during snapshot creation but may experience brief I/O suspension.
Check the restore window for point-in-time recovery
Determine the earliest and latest times you can restore to using the automated backup retention window.
LatestRestorableTime is typically within the last 5 minutes. The restore window extends back by the number of days in BackupRetentionPeriod.
Restore to a point in time
Create a new RDS instance restored to a specific point in time. This creates a completely new database instance, leaving the original untouched.
Point-in-time restore creates a new instance with a new endpoint. You must update your application's connection string to point to the restored instance.
Monitor restore progress
Wait for the restored instance to become available and check its status.
Clean up old snapshots
List and delete snapshots older than your retention policy to manage storage costs.
Automated snapshots are free up to your allocated storage size. Manual snapshots incur standard EBS snapshot storage charges at approximately $0.095/GB-month.
Full Script
FAQ
Discussion
Loading comments...