Updated on 2025-10-16 GMT+08:00

Configuring a Same-Region 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 to ensure data reliability. Backups are saved as packages in OBS buckets to ensure data confidentiality and durability. Since backing up data affects the database read and write performance, you are advised to set the automated backup time window 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.

Differences Between Common Backup and Sparse Backup

Table 1 Backup functions

Item

Common Backup

Sparse Backup

Function description

RDS for SQL Server uses common backup by default. Common backup backs up all instance data based on the specified time window and backup cycle. A backup file is generated each time a backup is complete, and is stored for the retention period you set.

If you want to retain backups for a long time, you can enable sparse backup to reduce costs. Compared with the default backup policy, sparse backup reduces the backup frequency while maintaining the same retention period for the backups.

To enable sparse backup, submit a service ticket to request required permissions. After sparse backup is enabled, a common backup policy is displayed by default. You can add sparse backup policies as needed.

Number of backup policies

An instance has only one backup policy, which cannot be deleted.

The default policy is weekly backup. Select at least one day in a week. The backups can be retained for 1 to 732 days.

An instance can have only one common backup policy and a maximum of nine sparse backup policies. The common backup policy cannot be deleted, but the sparse backup policies can be deleted.

After enabling sparse backup, you can add sparse backup policies alongside the common backup policy.

  • The common backup policy is weekly backup and cannot be deleted. Select at least one day in a week. The backups can be retained for 1 to 732 days.
  • There are three types of sparse backup policies. The backups can be retained for 1 to 3,660 days.
    • Weekly: Select at least one day in a week.
    • Monthly: Select at least one day in a month.
    • Yearly: Select a specific day in a year.

Time window

A one-hour period the backup will be scheduled within 24 hours, such as 01:00-02:00 or 12:00-13:00

A one-hour period the backup will be scheduled within 24 hours, such as 01:00-02:00 or 12:00-13:00

Billing

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

Procedure

  1. Click in the upper left corner and select a region.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the target instance name.
  4. In the navigation pane on the left, choose Backups & Restorations.
  5. In the upper right corner of the page, choose Modify Backup Policy > Configure Same-Region Backup Policy. You can see the configured backup policy. To modify the backup policy, adjust the parameter values as needed.

    Figure 1 Modifying a 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, submit a service ticket to request required permissions.
      • 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.

    • Manual Period
      • Permanent: Manual backups are retained until you manually delete them.
      • Custom: You can customize the retention period for manual backups from 1 to 732 days. Manual backups that exceed the retention period will be automatically deleted.
    • 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.
    • Scheduled Backup Policy: If this function is enabled, data is periodically backed up every month, which incurs certain fees. Up to 15 scheduled automated backups can be generated every month and retained for 90 to 732 days. If you want to extend the retention period, submit a service ticket.
      • To use the scheduled backup policy function, submit a service ticket to request required permissions.
      • Only one automated backup is generated for a DB instance every day. If you enable both Automated Backup and Scheduled Backup Policy, which one is triggered depends on the retention periods you configured for them. The backup with a longer retention period configured has a higher priority.
      • The time window for scheduled backup is the same every day.
      • Changing the time window and retention period for the scheduled backup policy affects only new backups. Expired backups will be automatically deleted.
      • If the scheduled backup policy is disabled, no new scheduled backups will be generated and expired backups will be automatically deleted.

  6. Click OK.

To use this function, submit a service ticket to request required permissions.

  1. Click in the upper left corner and select a region.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the target instance name.
  4. In the navigation pane on the left, choose Backups & Restorations.
  5. In the upper right corner of the page, choose Modify Backup Policy > Configure Same-Region Backup Policy. 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 2 Configuring a sparse backup policy
    • Time Window: Set it to 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 window is saved in the UTC time zone of the local browser. It changes with the time zone during the switch between the DST and standard time.

    • Sparse Backup Policy

      The common backup policy is weekly backup. Select at least one day in a week. The backups can be retained for 1 to 732 days.

      You can add multiple sparse backup policies to back up data by week, month, or year. A maximum of 9 sparse backup policies can be added for a DB instance.
      Table 2 Sparse backup policies

      Frequency

      Time

      Retention Period

      Every week

      Select at least one day in a week.

      The retention period is the number of days for storing full automated backups. In a common backup policy, you can set the retention period to 1 to 732 days. In a sparse backup policy, you can set this period to 1 to 3,660 days.

      The retention period for incremental backups is determined by the common backup policy and is irrelevant to sparse backup policies.

      If you modify the retention period specified in a policy, the modification will be applied to all the existing full automated backups associated with this policy. The retention period specified in any backup policy does not apply to manual backups.
      • Extending the retention period enhances data reliability.
      • Reducing the retention period may cause existing backups to be deleted due to expiration. Exercise caution when performing this operation.

      Every month

      Select at least one day in a month.

      Every year

      Select a specific day in a year.

    • If multiple backup policies need to create backups on the same day, the system generates only one backup on that day. It associates this backup with the policy that has the longest retention period and keeps the backup according to the period specified by that policy.
    • After sparse backup policies are configured, if no backup is generated in the specified backup window of a day (the backup conflicts with other operations or the backup fails), the backup will be skipped.
    • When deleting a sparse backup policy, you can choose whether to retain the backups generated under this policy. If you choose not to keep them, all backups created by this policy will be deleted immediately. If you choose to keep them, all these backups will be retained for the original retention period.

  6. Click OK.