Enabling automated backups - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Enabling automated backups

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.

Note

If you manage your backups in Amazon Backup, you can't enable automated backups. For more information, see Using Amazon Backup to manage automated backups for Amazon RDS.

To enable automated backups immediately
  1. Sign in to the Amazon Web Services Management Console and open the Amazon RDS console at https://console.amazonaws.cn/rds/.

  2. In the navigation pane, choose Databases, and then choose the DB instance or Multi-AZ DB cluster that you want to modify.

  3. Choose Modify.

  4. For Backup retention period, choose a positive nonzero value, for example 3 days.

  5. Choose Continue.

  6. Choose Apply immediately.

  7. Choose Modify DB instance or Modify cluster to save your changes and enable automated backups.

To enable automated backups, use the Amazon 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

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.

To describe the automated backups for your existing DB instances using the Amazon 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