Back up ApsaraDB RDS for SQL Server data

更新时间:
复制 MD 格式

ApsaraDB RDS for SQL Server supports both automated and manual backups. You can configure a backup policy to automatically back up your data and logs. You can also create manual backups on demand. If log backups are enabled, you can restore your instance to any point in time within the retention period.

Backup features

Data backup

ApsaraDB RDS for SQL Server provides two backup methods: physical backup and snapshot backup. For more information, see Differences between snapshot backups and physical backups.

Backup method

Description

Physical backup

  • Supports full and incremental physical backups. Logical backups are not supported.

  • To reduce the total backup size, incremental backup is enabled by default. When enabled, the system performs backups in a cycle of one full and two incremental backups.

    Incremental backup policy

    • Core backup cycle: The system performs backups in a "1 full backup + 2 incremental backups" cycle. A successful full backup, whether automatically scheduled or manually triggered, immediately starts or resets this three-day backup cycle.

    • Conditions for automatic upgrade to a full backup: To ensure the integrity of the backup chain and the security of your data, an incremental backup is automatically upgraded to a full backup if any of the following conditions are met:

      • Periodic forced rotation: The last successful full backup was more than three days ago.

      • Data integrity assurance: A new database is detected on the instance.

      • Backup chain repair: The previous backup task failed, or there is a risk of data corruption, such as a database creation failure.

    • Global setting: If you disable the incremental backup feature in the console, this policy does not apply, and all system backups will be full backups.

  • Supports single-database backup. You can specify one or more databases on the instance to back up.

  • SQL Server shrinks the transaction log during each backup. You can also manually shrink the transaction log by clicking Backup and Shrink Transaction Log on the Backup and Restoration page.

  • By default, instance backups are performed on the primary instance. For Cluster Edition instances, you can configure physical backups to prioritize the secondary instance. This feature is not supported for non-Cluster Edition instances. It reduces I/O load on the primary instance and improves its performance and stability.

    Notes on secondary instance backups

    • Feature limitation: Cluster Edition instances on the upgraded advanced backup policy page do not support setting a backup priority.

    • Incremental backup limitation: In secondary instance backup mode, the system does not support incremental backups. All data backups are full backups. This increases backup storage costs. We recommend that you adjust your backup policy accordingly, for example, by changing the backup frequency from daily to every other day.

    • Automatic failover: To ensure that backup tasks always succeed, the system automatically switches the backup task to the primary instance if the secondary instance is unavailable or does not meet backup requirements.

    • Operations forced on the primary instance: Some database maintenance operations, such as shrinking the transaction log, must be run on the primary instance. Even if secondary instance backup mode is enabled, the system forces these operations to run on the primary instance when you manually trigger them.

    • Impact of backup configuration changes : Modifying the backup policy by switching to secondary instance backup and changing the backup time may trigger an additional full backup after two minutes. To avoid unexpected impacts on your primary instance workloads, we strongly recommend that you perform this operation during off-peak hours.

Snapshot backup

A snapshot backup periodically creates full snapshot backups within the specified backup cycle. Compared with conventional physical backups, a snapshot backup is faster and has minimal impact on instance performance.

Log backup

  • The system automatically generates log backup files. You can set the generation frequency to Every 30 Minutes, Every 5 Minutes, or Same as Data Backup.

    Note
    • The frequency does not affect the total size of the log files.

    • In Snapshot Backup mode, the log backup frequency can be set only to Every 30 Minutes or Every 5 Minutes.

  • In the Full recovery model (the default recovery model for an instance), log backup is enabled by default and cannot be disabled. You can set the log backup retention period to 7-730 days.

    Important

    If you do not need to retain instance log backups, you can set the recovery model to the Simple recovery model. After you make this change, you cannot switch back to the Full recovery model. The Simple recovery model does not retain instance log backups, but data backups are not affected.

  • You can download log backup files.

    Note

    For ApsaraDB RDS for SQL Server Basic Edition instances with a log backup frequency of every 30 or 5 minutes, in extreme cases such as a complete failure of the underlying cloud disk, the instance can be restored only to the time of the most recent log backup from that interval.

Backup data protection

  • Tamper-proofing

    Full physical backups and log backups for ApsaraDB RDS for SQL Server are stored in OSS, and full snapshot backups are stored in the ESSD snapshot service. Both storage methods support Write-Once-Read-Many (WORM) to prevent tampering.

  • Protection against malicious or accidental deletion

    • Automatic expiration and deletion: The system automatically deletes expired backup sets based on the retention period that you configure in the backup policy. Automated backups cannot be disabled, the minimum retention period is 7 days, and the minimum backup frequency is twice per week. Therefore, automated full and log backups cannot be completely deleted.

    • Manual deletion by users: You cannot manually delete backup data.

Prerequisites

If this is your first time using the ApsaraDB RDS backup service, you must use your Alibaba Cloud account to grant permissions to the service-linked role for DBS (AliyunServiceRoleForDBS).

Usage notes

  • After you modify the backup time, a backup task may be triggered after two minutes. This can cause high I/O bandwidth usage on your primary instance and affect your workloads. We recommend that you change the backup time during off-peak hours to minimize the performance impact.

  • A physical backup for SQL Server consumes significant I/O and CPU resources on the instance, which can affect your applications. We recommend that you perform physical backups during off-peak hours.

  • If the data volume is large, the backup may take a long time to complete.

  • If the archive to OSS feature is enabled for an instance and a database is converted to cold storage, you cannot back up or restore the cold storage database.

  • Backup files are retained for a limited period. To avoid data loss due to expiration, download the backup files that you want to retain long-term to your computer.

  • The instance collects traffic data from the network interface controller (NIC) to reflect the network bandwidth usage of SQL Server. Because backup traffic is included in the statistics, network traffic spikes during data backups.

Billing

Each instance comes with a free backup storage quota. You are not charged for backup storage as long as the total usage is within your free quota. If the quota is exceeded, backup storage fees apply. For more information, see Free Quota and Billing Details.

Configure an automatic backup policy

ApsaraDB RDS provides an automated backup feature that periodically backs up your databases based on your specified backup policy. For instances in some regions, you can upgrade the backup policy page to the advanced version. If an upgrade option is not available, submit an application to request access. The advanced version allows you to implement sparse backup. After the upgrade, the entry point for configuring the backup policy and some parameters may differ. Choose the configuration method that matches your console.

Standard backup policy

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. In the Data Backup Settings area, click Edit.

  4. Configure the following parameters and click Save.

    Parameter

    Description

    Data Backup Retention (Days)

    The default value is 7 days. You can set a value from 7 to 730 days.

    Backup Cycle

    Select at least two days of the week for data backups.

    Backup Method

    ApsaraDB RDS for SQL Server supports the following two backup methods:

    • Snapshot backup: a backup file that captures the state of a cloud disk at a specific point in time. This method is fast.

    • Physical Backup: the default backup method for an instance. This method creates a copy of the target data and is relatively slow.

    Important

    After you switch to Snapshot Backup, you can still select Physical Backup when you perform a manual backup.

    Backup Priority

    For Cluster Edition instances that use the Physical Backup method, you can set the backup priority:

    • Primary Instance Only: specifies that backups are performed only on the primary instance.

    • Secondary Instance Preferred: specifies that backups are performed on the secondary instance to reduce I/O load on the primary instance and improve instance performance and stability. If the secondary instance does not meet backup requirements, such as being unavailable, the backup is switched to the primary instance.

    Note

    This feature is available only for Cluster Edition instances. If you set the backup priority to the secondary instance, incremental backup and 5-minute log backups are not supported.

    Incremental Backup

    Specifies whether to enable incremental backup.

    Note

    You cannot configure incremental backups if the Backup Method is Snapshot Backup, or if the backup method for a Cluster Edition instance is Physical Backup.

    Backup Time

    Select the time range when data backups start, for example, 06:00-07:00. We recommend that you set this to off-peak hours.

    Backup Frequency

    You can set the frequency at which log files are generated. Options: Same as Data Backup, Every 30 Minutes, or Every 5 Minutes.

    Important

Advanced backup policy

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. Then, click the circled number between SQL Server and Level-1 Backup.

    image.png

  4. Configure the following parameters and click OK.

    Parameter

    Description

    Backup Policy

    Select the backup time and backup set retention period. You must configure at least two backups per week.

    Note

    You can click Add backup policy to add a sparse backup policy. This allows for more flexible backup scheduling while retaining fewer backup sets.

    Backup Time

    Select the time when data backups start, for example, 07:00-08:00. We recommend that you set this to off-peak hours.

    Incremental Backup

    Specifies whether to enable incremental backup.

    Note

    You cannot enable incremental backup if the Backup Method is Snapshot Backup.

    Backup Method

    ApsaraDB RDS for SQL Server supports the following two backup methods:

    • Snapshot backup: a backup file that captures the state of a cloud disk at a specific point in time. This method is fast.

    • Physical Backup: the default backup method for an instance. This method creates a copy of the target data and is relatively slow.

    Important

    After you switch to Snapshot Backup, you can still select Physical Backup when you perform a manual backup.

    Backup Frequency

    You can set the frequency at which log files are generated. Options: Same as Data Backup or Every 30 Minutes.

    Note

    The log backup retention period is the same as the data backup retention period and cannot be configured separately.

    Log Backup Retention Period

    Cannot exceed the data backup retention period. You can set a value from 7 to 7,300 days. The default value is 7 days.

  5. In the lower-left corner of the Backup Strategy page, click Save.

Create a manual backup

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the upper-right corner of the page, click Backup Instance to open the Backup Instance dialog box.

  3. Configure the following parameters and click OK.

    Parameter

    Description

    Backup Policy

    • Snapshot backup: a backup file that captures the state of a cloud disk at a specific point in time. This method is fast.

    • Physical Backup: the default backup method for an instance. This method creates a copy of the target data and is relatively slow.

    Note

    The Snapshot Backup option is displayed only if the automatic backup policy is set to Snapshot Backup.

    Select Backup Mode

    • Full Backup: immediately performs a full backup.

    • Automatic Backup: immediately performs a backup. The system determines whether to perform a full or differential backup based on predefined rules.

      Rule: If a full backup was performed within the last three days, the system performs a differential backup, which backs up all data that has changed since the last full backup. Otherwise, a full backup is performed.

      Note

      For instances of Cluster Edition, if the automatic backup policy is set to Physical Backup and the backup priority is set to Prioritize backup from secondary instance, only Full Backup is supported.

    Backup Policy

    This parameter is available only when Select Backup Mode is set to Full Backup.

    • Instance Backup: backs up the entire instance.

    • Single-Database Backup: available only when Backup Policy is set to Physical Backup. You can configure the retention period for the backup set and specify the databases to back up:

      • Backup Set Retention Days: You can specify a value from 7 to 730, or -1 for long-term retention.

      • Database: In the left-side list, select the databases to back up and click the image icon to add them to the right-side list. If you do not have any databases, create a database first.

  4. After you configure a backup policy, a backup task is created. You can click the 查看备份进度 icon in the upper-right corner of the page. On the Tasks page, set the Task Type parameter to Manual Backup and view the progress of the backup task. 备份进程

    Note

    After the backup is complete, go to the Backup and Restoration > Base Backups > Data Backup or Log Backup page to download data and log backups.

Related operations

Extend expiration for single-database backups

You can use the ApsaraDB RDS console or the ModifyBackupSetExpireTime API to extend the expiration time of a full, physical, single-database manual backup set. Shortening the expiration time is not supported.

Note

When you use the API to extend the expiration time of a backup set, you must provide a time in UTC. The ApsaraDB RDS console automatically converts this time to Beijing time (UTC+8) for display. For example:

  • If you provide the time 2025-07-15T12:10:23Z to the API, the ApsaraDB RDS console displays it as 2025-07-15 20:10:23.

  • Conversely, if you want to set the expiration time to a specific Beijing time, you must convert it to the corresponding UTC time before providing it to the API.

  1. In the Actions column of the target backup set, click the image icon and select Change Expiration Time.

    image

  2. In the dialog box that appears, set a new expiration time and click OK.

    After the change is complete, you can view the new expiration time in the Expiration Time column of the target backup set. The system retains the backup set until the new expiration time.

Related documents

FAQ

Can I disable data and log backups?

No. Data and log backups are enabled by default and cannot be disabled. However, you can reduce the backup frequency. A minimum of two backups per week is required.

Note
  • The log backup retention period is the same as the data backup retention period and cannot be configured separately.

  • For log backup management, if you do not need to retain instance log backups, you can set the recovery model to the Simple recovery model. After you make this change, you cannot switch back to the Full recovery model. The Simple recovery model does not retain instance log backups, but data backups are not affected. For more information about the differences between the two recovery models, see Enable the Simple recovery model.

How can I delete or reduce data and log backups?

You cannot manually delete existing data backup sets or log backup sets. If your backups exceed your free quota, you can use the following methods to manage costs:

  • Reduce backup size

    You can reduce the number of backup sets by decreasing the backup frequency or have the system automatically delete existing backups by shortening the backup retention period. You cannot manually delete backup sets.

  • Increase the free backup quota

    The free quota depends on the storage capacity of your instance. You can increase the storage capacity to get a larger free backup quota for your instance. For example, if you use snapshot backups, increasing the instance storage from 150 GB to 300 GB increases the free quota from 300 GB to 600 GB.

  • PurchaseRDS Savings Plans or RDS Storage Capacity Unit to offset subsequent backup costs

    If you must retain backups long-term and do not need to expand your storage capacity, you can purchase RDS Savings Plans or an RDS Storage Capacity Unit to offset backup costs. If you purchase both an RDS Savings Plans and an RDS Storage Capacity Unit, the RDS Storage Capacity Unit is applied first.

Why does snapshot backup not support incremental backup?

A snapshot backup periodically backs up data by taking snapshots on the cloud disk. This feature allows you to quickly restore data to a specific point in time. However, because snapshots are based on cloud disks rather than backup files, incremental backup is not supported.

Note

The snapshot feature uses an incremental snapshot chain. It retains the state of each past snapshot, so each subsequent snapshot backup stores only the new and updated data on the cloud disk.

Why is incremental backup not supported when I select the backup policy that prioritizes the secondary instance?

Due to the kernel characteristics of ApsaraDB RDS for SQL Server, the secondary instance cannot clear the differential bitmap. Therefore, the secondary instance cannot support incremental backups. For more information, see the official documentation.

If I manually perform a full backup while incremental backup is enabled, does this affect the existing automatic backup policy?

Yes. When incremental backup is enabled, if you perform a manual full backup during the backup cycle, the system automatically performs incremental backups for the next three days. For example, if incremental backup is enabled, a full backup is scheduled for Monday, and an incremental backup is scheduled for Tuesday. If you manually perform a full backup on Wednesday, the system automatically performs incremental backups on Thursday and Friday.

What are the differences between snapshot and physical backups?

Item

Physical backup

Snapshot backup

Log backup frequency

Supports the following three frequencies.

  • Same as Data Backup

  • Every 30 Minutes

  • Every 5 minutes

Supports the following two frequencies.

  • Every 30 Minutes

  • Every 5 minutes

Impact on instance performance

High resource consumption and significant impact on instance performance. We recommend that you perform backups during off-peak hours.

Minimal I/O resource consumption and negligible impact on instance performance. You can perform backups at any time.

Restoration speed

Relatively fast. The speed varies based on instance specifications.

Extremely fast. Snapshot restoration is independent of data volume and is significantly faster than physical backup restoration.

Estimated restoration times

  • Restore to a new instance

    • Restore from a backup set: Approximately 30 minutes (instance creation time + data restoration time).

    • Restore to a point in time: Depends on the volume of logs to restore (instance creation time + log restoration time).

  • Restore to an existing instance

    • Restore from a backup set: Approximately 10 minutes.

    • Restore to a point in time: Depends on the volume of logs to restore.

Note

This refers to the logs generated between the time of the snapshot and the target restoration point.

Backup data volume

Unlimited

Unlimited

Backup set download

Supported

Not supported