If your DB instance doesn't have automated backups enabled, you can enable them at any time. You enable automated backups by setting the backup retention period to a positive nonzero value. When automated backups are turned on, your DB instance is taken offline and a backup is immediately created.
Console :
To enable automated backups immediately* Sign in to the AWS Management Console and open the Amazon RDS console at
https://console.aws.amazon.com/rds/.
* In the navigation pane, choose Databases, and then choose the DB instance or Multi-AZ DB cluster that you want to modify.
* Choose Modify.
* For Backup retention period, choose a positive nonzero value, for example 3 days.
* Choose Continue.
* Choose Apply immediately.
* Choose Modify DB instance or Modify cluster to save your changes and enable automated backups.
AWS CLI :
To enable automated backups, use the AWS CLI
modify-db-instance
or
modify-db-cluster
command.
Include the following parameters :* --db-instance-identifier
(or
--db-cluster-identifier
for a Multi-AZ DB cluster)
* --backup-retention-period
* --apply-immediately
or
--no-apply-immediately
In the following example, we enable automated backups by setting the backup retention period to three days. The changes are applied immediately.
For Linux, macOS, or Unix :
aws rds modify-db-instance \
--db-instance-identifier mydbinstance \
--backup-retention-period 3 \
--apply-immediately?
For Windows :
aws rds modify-db-instance ^
--db-instance-identifier mydbinstance ^
--backup-retention-period 3 ^
--apply-immediately?
RDS API :
To enable automated backups, use the RDS API
ModifyDBInstance
or
ModifyDBCluster
operation with the following required parameters:
* DBInstanceIdentifier
or
DBClusterIdentifier
* BackupRetentionPeriod
Viewing automated backups :
To view your automated backups, choose Automated backups in the navigation pane. To view individual snapshots associated with an automated backup, choose Snapshots in the navigation pane. Alternatively, you can describe individual snapshots associated with an automated backup. From there, you can restore a DB instance directly from one of those snapshots.
Automated snapshot names follow the pattern
rds:<database-name>-yyyy-mm-dd-hh-mm
, with
yyyy-mm-dd-hh-mm
representing the date and time the snapshot was created.
To describe the automated backups for your existing DB instances using the AWS CLI, use one of the following commands:
aws rds describe-db-instance-automated-backups --db-instance-identifier DBInstanceIdentifier?
or
aws rds describe-db-instance-automated-backups --dbi-resource-id DbiResourceId?
To describe the retained automated backups for your existing DB instances using the RDS API, call the
DescribeDBInstanceAutomatedBackups
action with one of the following parameters:
* DBInstanceIdentifier
* DbiResourceId