Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Working With Automated Backups

Amazon RDS creates a storage volume snapshot of your DB instance, backing up the entire DB instance and not just individual databases. You can set the backup retention period when you create a DB instance. If you don't set the backup retention period, Amazon RDS uses a default period retention period of one day. You can modify the backup retention period; valid values are 0 (for no backup retention) to a maximum of 35 days. Manual snapshot limits (50 per region) do not apply to automated backups.

Important

An outage will occur if you change the backup retention period from 0 to a non-zero value or from a non-zero value to 0.

All automated backups are deleted and cannot be recovered when you delete a DB instance. Manual snapshots are not deleted. For information on pricing for storing manual snapshots long-term, see Amazon RDS Pricing.

In this example, you will enable and then disable backups for an existing DB instance called mydbinstance.

Disabling Automated Backups

You may want to temporarily disable automated backups in certain situations; for example, while loading large amounts of data.

Important

We highly discourage disabling automated backups because it disables point-in-time recovery. If you disable and then re-enable automated backups, you are only able to restore starting from the time you re-enabled automated backups.

In these examples, you disable automated backups for a DB instance by setting the backup retention parameter to 0.

AWS Management Console

To disable automated backups immediately

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, click DB Instances, and then select the check box next to the DB instance you want to modify.

  3. Click the Modify button.

    The Modify DB Instance window appears.

  4. Select 0 in the Backup Retention Period drop-down list box.

  5. Check the Apply Immediately check box.

  6. Click the OK button.

CLI

To disable automated backups immediately, use the modify-db-instance command and set the backup retention period to 0 with --apply-immediately.

Example

The following example immediately disabled automatic backups.

For Linux, OS X, or Unix:

aws rds modify-db-instance \
    --db-instance-identifier mydbinstance \
    --backup-retention-period 0 \
    --apply-immediately

For Windows:

aws rds modify-db-instance ^
    --db-instance-identifier mydbinstance ^
    --backup-retention-period 0 ^
    --apply-immediately

To know when the modification is in effect, call describe-db-instances for the DB instance until the value for backup retention period is 0 and mydbinstance status is available.

aws rds describe-db-instances --db-instance-identifier mydbinstance

API

To disable automated backups immediately, call the Amazon RDS API action ModifyDBInstance with the following parameters:

  • DBInstanceIdentifier = mydbinstance

  • BackupRetentionPeriod = 0

Example

https://rds.amazonaws.com/
    ?Action=ModifyDBInstance
    &DBInstanceIdentifier=mydbinstance
    &BackupRetentionPeriod=0
    &SignatureVersion=2
    &SignatureMethod=HmacSHA256
    &Timestamp=2009-10-14T17%3A48%3A21.746Z
    &AWSAccessKeyId=<AWS Access Key ID>
    &Signature=<Signature>

Enabling Automated Backups

If your DB instance doesn't have automated backups enabled, you can enable them at any time. The same request used to disable automated backups can be used to enable them by using a positive non-zero value for the backup retention period. When automated backups are enabled, a backup is immediately created.

All automated backups are deleted and cannot be recovered when you delete a DB instance. Manual snapshots are not deleted.

In this example, you enable automated backups for a DB instance by setting the backup retention period parameter for the DB instance to a positive non-zero value (in this case, 3).

AWS Management Console

To enable automated backups immediately

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, click DB Instances, and then select the check box next to the DB instance you want to modify.

  3. Click the Modify button or right-click the DB instance and select Modify from the context menu.

    The Modify DB Instance window appears.

  4. Select 3 in the Backup Retention Period drop-down list box.

  5. Check the Apply Immediately check box.

  6. Click the OK button.

CLI

To enable automated backups immediately, use the AWS CLI modify-db-instance command.

In this example, we will enable automated backups by setting the backup retention period to 3 days.

Include the following parameters:

  • --db-instance-identifier

  • --backup-retention-period

  • --apply-immediately or --no-apply-immediately

Example

For Linux, OS X, 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

API

To enable automated backups immediately, use the AWS CLI ModifyDBInstance command.

In this example, we will enable automated backups by setting the backup retention period to 3 days.

Include the following parameters:

  • DBInstanceIdentifier = mydbinstance

  • BackupRetentionPeriod = 3

  • ApplyImmediately = true

Example

https://rds.amazonaws.com/
 ?Action=ModifyDBInstance
 &DBInstanceIdentifier=mydbinstance
 &BackupRetentionPeriod=3
 &ApplyImmediately=true
 &SignatureVersion=2
 &SignatureMethod=HmacSHA256
 &Timestamp=2009-10-14T17%3A48%3A21.746Z
 &AWSAccessKeyId=<AWS Access Key ID>
 &Signature=<Signature>