ApsaraDB RDS for SQL Server supports automatic backup and manual backup. You can specify a backup cycle in a backup policy for the system to automatically back up your ApsaraDB RDS for SQL Server instance. You can also manually back up your RDS instance.
The default backup feature that is provided by the system stores backup files in the same region as your RDS instance. For more information about how to store backup files in a region that is different from the region of your RDS instance, see Use the cross-region backup feature.
Backup description
Data backup
Backup method | Description |
Physical backup |
|
Snapshot backup | Full snapshot backups are performed based on the backup cycle that you specify. The snapshot backup method is faster and supports larger amounts of data than the physical backup method. Note Snapshot backups are used to periodically back up data snapshots on cloud disks. You can use the snapshots to quickly restore data to a specific point in time. For more information, see Use the snapshot backup feature. |
Log backup
The system automatically generates log backup files for your RDS instance based on the backup frequency that you specify. The Same as Data Backup and Every 30 Minutes backup frequencies are supported.
NoteThe total size of log backup files does not vary based on the backup frequency.
After you change the backup method to Snapshot Backup, the backup frequency is fixed as Every 30 Minutes.
The log backup feature is enabled by default and cannot be disabled. You can specify a log backup retention period that ranges from 7 days to 730 days.
You can download log backup files. For more information, see Download data backup files and log backup files.
NoteIf the backup frequency is set to Every 30 Minutes, you can restore the data of your RDS instance that runs RDS Basic Edition to a specific point in time within the previous 30 minutes in the event of cloud disk damage or other unexpected failures.
Prerequisites
The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account when you use the backup feature of ApsaraDB RDS for the first time. For more information, see How do I create a service-linked role for DBS?
Usage notes
After you modify the backup time of your RDS instance, a backup may be triggered 2 minutes later. This may cause high I/O bandwidth on the primary RDS instance and affect your workloads. To minimize the impact on the performance of your RDS instance, we recommend that you modify the backup time of your RDS instance during off-peak hours.
When you perform a physical backup on your RDS instance, the backup speed is fast and cannot be limited. This may cause high I/O bandwidth and affect your workloads. To minimize the impact on the performance of your RDS instance, we recommend that you perform physical backups during off-peak hours.
If your RDS instance has a large amount of data, a backup may require a long period of time.
Backup files are retained for a specific period of time. Before the retention period elapses, we recommend that you download the required backup files to your computer.
If your RDS instance runs RDS Basic Edition, RDS High-availability Edition, or RDS Cluster Edition, the RDS instance collects traffic statistics from the network interface controllers to better reflect the bandwidth usage in SQL Server. Statistics about the traffic that is consumed by data backups are also collected. The amount of traffic on your RDS instance surges during a data backup.
If your RDS instance runs RDS Cluster Edition and uses the Physical Backup method, you can specify a backup priority. You can determine whether to use the primary database only or secondary database preferred backup mode for the RDS instance. For more information, see RDS Cluster Edition. Take note of the following items:
The default backup mode for a new RDS instance that runs RDS Cluster Edition is primary database only.
The secondary database backup feature does not support incremental backups. If you use this feature, the system performs full backups instead of incremental backups. This increases the amount of backup data. To prevent an excessively large amount of backup data, we recommend that you modify the backup policy. For example, you can change the backup policy from one backup every day to one backup every two days.
If you use the secondary database preferred mode for your RDS instance that runs RDS Cluster Edition, backups are preferentially performed on the secondary RDS instance. If the secondary RDS instance does not meet the backup conditions, backups are automatically performed on the primary RDS instance. For example, if the secondary RDS instance is unavailable, backups are automatically performed on the primary RDS instance.
If you change the backup policy to secondary database backup and change the backup time, a full backup may be triggered 2 minutes later. In this case, if the secondary RDS instance does not meet the backup conditions, backups are automatically performed on the primary RDS instance. This affects your workloads. For example, if the secondary RDS instance is unavailable, backups are automatically performed on the primary RDS instance. To reduce the impact of resource consumption caused by backup operations on instance performance, we recommend that you modify the backup policy and backup time during off-peak hours.
Transaction log shrinking is forcefully performed on the primary RDS instance, and cannot be performed on the secondary RDS instance. If the RDS instance uses the secondary database backup policy and you manually shrink the transaction logs of the instance, transaction log shrinking is forcefully scheduled to the primary RDS instance.
Billing rules
Each RDS instance is allocated a free quota for backup storage. If the backup storage of your RDS instance does not exceed the free quota, you are not charged for backup storage. If the backup storage exceeds the free quota, you are charged for the excess storage that you use. For more information about the free quota and billing rules, see Backup storage fees.
Configure automatic backups
After you configure a backup policy for your RDS instance, the system automatically and periodically backs up the RDS instance based on the backup policy.
- 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.
In the left-side navigation pane, click Backup and Restoration.
On the Backup Strategy tab of the Backup and Restoration page, click Edit in the Data Backup Settings section.
In the dialog box that appears, configure the following parameters and click Save.
Parameter
Description
Data Backup Retention (Days)
The number of days for which you want to retain data backup files. Valid values: 7 to 730. Default value: 7.
Backup Cycle
The cycle based on which you want to perform a backup. You must select at least two days of the week.
Backup Method
The backup method that you want to use. Valid values:
Snapshot Backup: The system backs up the data from cloud disks at a specific point in time. The backup speed is fast. For more information, see Enable the snapshot backup feature.
Physical Backup: This is the default backup method. The system creates a replica of the data of your RDS instance. The backup speed is slow.
ImportantAfter you change the backup method to Snapshot Backup, you can still perform a Physical Backup when you manually back up your RDS instance. For more information, see Back up an ApsaraDB RDS for SQL Server instance.
Backup Priority
Valid values: Primary Database Only and Secondary Database Preferred. This parameter is available only if your RDS instance runs RDS Cluster Edition and uses the Physical Backup.
Primary Database Only: Backups are performed only on the primary RDS instance.
Secondary Database Preferred: Backups are performed on the secondary RDS instance. This helps reduce the I/O loads of the primary RDS instance and improve instance performance and stability. If the secondary RDS instance does not meet the backup conditions, backups are automatically performed on the primary RDS instance. For example, if the secondary RDS instance is unavailable, backups are automatically performed on the primary RDS instance.
NoteIf you set Secondary Database Backup to Secondary Database Preferred, the incremental backup feature is not supported.
Incremental Backup
Specifies whether to enable the incremental backup feature. For more information, see Backup description.
NoteIf you set the Backup Method parameter to Snapshot Backup or your RDS instance runs RDS Cluster Edition and uses the Physical Backup method, you cannot enable the incremental backup feature.
Backup Time
The period of time during which a data backup operation is performed. For example, you can set this parameter to 06:00-07:00. We recommend that you select an off-peak hour.
Backup Frequency
The frequency to generate log backup files. Valid values: Same as Data Backup and Every 30 Minutes.
NoteFor more information about log backups, see Back up an ApsaraDB RDS for SQL Server instance.
The log backup retention period is the same as the data backup retention period. You cannot separately configure the log backup retention period.
Configure manual backups
- 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.
In the upper-right corner of the page, click Backup Instance. The Backup Instance dialog box appears.
Configure the following parameters and click OK.
Parameter
Description
Backup Policy
Snapshot Backup: The system backs up the data from cloud disks at a specific point in time. The backup speed is fast. For more information, see Enable the snapshot backup feature.
Physical Backup: This is the default backup method. The system creates a replica of the data of your RDS instance. The backup speed is slow.
NoteThe Snapshot Backup option is displayed only when the automatic backup policy is set to Snapshot Backup.
Select Backup Mode
Full Backup: The system immediately performs a full backup.
Automatic Backup: The system immediately performs a full backup or an incremental backup.
NoteIf the RDS instance runs RDS Cluster Edition, the automatic backup policy is set to Physical Backup, and Secondary Database Preferred is selected, only Full Backup is supported.
Backup Policy
This parameter is available only when the Select Backup Mode parameter is set to Full Backup.
Instance Backup: The system backs up all data of your RDS instance.
Single-Database Backup: The system backs up only the databases that you specify. This parameter is available only if the Backup Policy parameter is set to Physical Backup.
NoteIf you select Single-Database Backup, the Database section appears. In this section, select the databases that you want to back up from the left-side list and click the > icon to move the selected databases to the right-side list. If no databases are created on your RDS instance, you must create databases before you back up your RDS instance. For more information, see Create a database on an ApsaraDB RDS for SQL Server instance.
The system generates a backup task. 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 backup progress.
NoteAfter the backup task is complete, you can download the backup file on the Data Backup or Log Backup tab on the Base Backups tab of the Backup and Restoration page. For more information, see Download the data backup files and log backup files.
FAQ
Can I disable the data backup feature or the log backup feature for my RDS instance?
No, you cannot disable the features. By default, the data backup and log backup features are enabled and cannot be disabled. You can reduce the backup frequency, such as twice a week.
NoteThe log backup retention period is the same as the data backup retention period. You cannot separately configure the log backup retention period.
Why are incremental backups not supported by the snapshot backup feature?
Snapshot backups are used to periodically back up data snapshots on cloud disks. You can use the snapshots to quickly restore data to a specific point in time. Snapshots are created based on cloud disks instead of backup files. As a result, the snapshot backup feature does not support incremental backups.
NoteSnapshots use the incremental snapshot chain mechanism. This mechanism retains the status of a snapshot at each point in time. As a result, a snapshot backup only backs up the incremental and updated data on cloud disks.
Why are incremental backups not supported by the secondary database preferred mode?
The differential bitmaps cannot be deleted from the secondary RDS instance due to kernel reasons of ApsaraDB RDS for SQL Server. As a result, the secondary database preferred mode does not support incremental backups. For more information, see official documentation.
If the incremental backup feature is enabled, is the existing automatic backup policy affected after I manually perform a full backup?
If the incremental backup feature is enabled and you perform a full backup during a backup cycle, the system automatically performs an incremental backup within three days starting from the day on which the full backup is performed. For example, a full backup is performed on Monday and an incremental backup is performed on Tuesday. If a full backup is performed on Wednesday, an incremental backup is separately performed on Thursday and Friday.
Related operations
Operation | Description |
Creates a data backup for an instance. | |
Queries the data backup files of an instance. | |
Queries the backup settings of an instance. | |
Modifies the backup settings of an instance. | |
Queries the backup tasks of an instance. | |
Queries the binary log files of an instance. |