Updated on 2024-10-14 GMT+08:00

Configuring an Automated Backup Policy

Scenarios

When you create a DB instance, an automated backup policy is enabled by default. For security purposes, the automated backup policy cannot be disabled. After the DB instance is created, you can customize the automated backup policy as required and then RDS backs up data based on the automated backup policy you configure.

RDS backs up data at the DB instance level, rather than the database level. If a database is faulty or data is damaged, you can restore it from backups. Backups are saved as packages in OBS buckets to ensure data confidentiality and durability. Since backing up data affects database read and write performance, the automated backup time window should be set to off-peak hours.

After an automated backup policy is configured, full backups are created based on the time window and backup cycle specified in the policy. The time required for creating a backup depends on how much data there is in the instance. Backups are stored for as long as you specified in the backup policy.

You do not need to set an interval for incremental backup because RDS automatically backs up incremental data every 5 minutes. Incremental backups can be used to restore data to a specific point in time.

Constraints

You can only configure an automated backup policy for your DB instance, but not for read replicas.

Billing

Backups are saved as packages in OBS buckets. For the billing details, see How Is RDS Backup Data Billed?

Modifying an Automated Backup Policy

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the target DB instance.
  5. On the Backups & Restorations page, click Intra-Region Backup Policies. On the displayed page, you can view the existing backup policy. If you want to modify the policy, adjust the values of the following parameters:

    Figure 1 Modifying an automated backup policy
    • Retention Period: How many days your automated full backups and incremental backups can be retained. The retention period is from 1 to 732 days and the default value is 7. To extend the retention period, contact customer service.
      • Extending the retention period improves data reliability.
      • Reducing the retention period takes effect for existing backups. Any backups (except manual backups) that have expired will be automatically deleted. Exercise caution when performing this operation.

      Policy for automatically deleting automated full backups:

      To ensure data integrity, even after the retention period expires, the most recent backup will be retained, for example, if Backup Cycle was set to Monday and Tuesday and Retention Period was set to 2:

      • The full backup generated on Monday will be automatically deleted on Thursday because:

        The backup generated on Monday expires on Wednesday, but it is the last backup, so it will be retained until a new backup expires. The next backup will be generated on Tuesday and will expire on Thursday. So the full backup generated on Monday will not be automatically deleted until Thursday.

      • The full backup generated on Tuesday will be automatically deleted on the following Wednesday because:

        The backup generated on Tuesday will expire on Thursday, but as it is the last backup, it will be retained until a new backup expires. The next backup will be generated on the following Monday and will expire on the following Wednesday, so the full backup generated on Tuesday will not be automatically deleted until the following Wednesday.

    • Time Window: A one-hour period the backup will be scheduled for each day, such as 01:00-02:00 or 12:00-13:00. The backup time window indicates when the backup starts. The backup duration depends on the data volume of your instance.

      To minimize the potential impact on services, set the time window to off-peak hours. The backup time is in UTC format. The backup time segment changes with the time zone during the switch between the DST and standard time.

    • Backup Cycle: Daily backups are selected by default, but you can change it. At least one day must be selected.

  6. Click OK.