An automated snapshot is an RDS database backup created once daily during a configured window and retained for a configured number of days. Set BackupRetentionPeriod from 1 to 35 days; setting it to 0 disables automated backups. section 10.3.1 section 10.3
Choose a low-traffic backup window because RDS briefly freezes disk activity, potentially delaying requests or causing timeouts. If no window is specified, RDS selects a changing 30-minute period during the night. section 10.3.1
Manage automated snapshots with these rules:
- Configure the retention period and backup window through CloudFormation, the Management Console, or SDKs. section 10.3.1
- Expect automated snapshots to disappear after the retention period or when the RDS instance is deleted. section 10.3.1 section 10.3.2
- Copy an automated snapshot to a manual snapshot when it must outlive the automated retention period. section 10.3.2
- Restore an automated snapshot to a new database instance or select a point within the retention period, potentially as recent as five minutes ago. section 10.3.3
WordPress database protection
Set a three-day retention period and a 05:00–06:00 UTC backup window for a WordPress RDS database. If accidental deletion or hardware failure damages the data, restore a database from a snapshot or from a chosen recent point in time. section 10.3.1 section 10.3.3
Listing 10.3 Modifying an RDS database’s snapshot time frame and retention time
Database:
Type: 'AWS::RDS::DBInstance'
DeletionPolicy: Delete
Properties:
AllocatedStorage: 5
BackupRetentionPeriod: 3 #1
PreferredBackupWindow: '05:00-06:00' #2
DBInstanceClass: 'db.t2.micro'
DBName: wordpress
Engine: MySQL
MasterUsername: wordpress
MasterUserPassword: wordpress
VPCSecurityGroups:
- !Sub ${DatabaseSecurityGroup.GroupId}
DBSubnetGroupName: !Ref DBSubnetGroup
DependsOn: VPCGatewayAttachment
Shows the smallest CloudFormation change for a three-day retention period and a 05:00–06:00 UTC backup window. section 10.3.1
