All Products
Search
Document Center

ApsaraDB RDS:Back up an ApsaraDB RDS for SQL Server instance

Last Updated:May 15, 2023

This topic describes how to back up an ApsaraDB RDS for SQL Server instance. You can configure a backup policy that allows the system to automatically back up your RDS instance. You can also manually back up your RDS instance.

For more information about how to back up an RDS instance that runs a different database engine, see the following topics:

Note

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 Enable the cross-region backup feature for an ApsaraDB RDS for SQL Server instance.

Prerequisites

The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account. 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 two minutes later. This may cause high I/O bandwidth on the primary RDS instance and affect your workloads. We recommend that you modify the backup time of your RDS instance during off-peak hours to minimize the impact on the performance of your RDS instance.

  • 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. We recommend that you perform the physical backup during off-peak hours to minimize the impact on the performance of your RDS instance.

  • 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 specified period of time. Before the specified 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 of the operating system that is used to better reflect the bandwidth usage in SQL Server. Statistics about the traffic that is consumed by data backups are also collected. The volume of traffic on your RDS instance surges during a data backup.

Billing rules

If the backup storage of your RDS instance does not exceed the free quota on backup storage, you are not charged for backup storage. If the backup storage exceeds the free quota, you are charged for the excess backup storage that you use. For more information about the free quota and billing rules, see Billable items and pricing for the backup storage of an ApsaraDB RDS for SQL Server instance.

Overview of data backups and log backups

Database engine

Data backup

Log backup

SQL Server

  • Physical Backup

    • Full physical backups and incremental physical backups are supported. Logical backups are not supported.

    • The incremental backup feature is enabled by default. Automatic backups are performed based on the backup cycle that you specify. The backup cycle consists of three phases: a full backup, an incremental backup, and another incremental backup. For example, if you select Monday, Wednesday, and Friday of a week as a backup cycle, a full backup is performed on every Monday, and an incremental backup is separately performed on every Wednesday and Friday.

      Note
      • If the incremental backup feature is disabled, no incremental backups are performed. Instead, full backups are performed within the backup cycle. For example, if you select Monday, Wednesday, and Friday as a backup cycle, a full backup is separately performed on every Monday, Wednesday, and Friday.

      • If a manual full backup is performed within a backup cycle, two consecutive incremental backups are automatically performed within the remaining two days following the manual full backup.

      • A free quota on backup storage is provided for your RDS instance. If the total size of the backup files of your RDS instance does not exceed the free quota, no backup fees are generated. If the total size exceeds the free quota, you are charged for the excess backup storage that you use. For more information about the free quota and billing rules, see Backup storage pricing of an ApsaraDB RDS for SQL Server instance.

    • Backups on individual databases are supported. You can back up one or more databases of your RDS instance at a time.

    • The system shrinks the transaction logs of the RDS instance during each backup. You can log on to the ApsaraDB RDS console and go to the Backup and Restoration page of your RDS instance. Then, you can click Shrink Transaction Log to manually shrink transaction logs.

  • Snapshot Backup

    Full snapshot backups are performed based on the backup cycle that you specify.

  • The system automatically backs up the log backup files of your RDS instance based on the backup frequency that you specify. The system supports the following two backup frequencies:

    • Same as Data Backup

    • Every 30 Minutes

    The total size of log backup files does not vary based on the backup frequency that you specify.

    Note

    The backup frequency for Snapshot Backup is fixed as Every 30 Minutes.

  • The log backup feature 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.

Note

If the Backup Frequency parameter is set to Every 30 Minutes, you can restore the data of your RDS instance to a specific point in time within the previous 30 minutes in the event of cloud disk damage or other unexpected failures. This is supported when your RDS instance runs RDS Basic Edition.

Perform an automatic backup

After you configure a backup policy for your RDS instance, the system automatically backs up the RDS instance based on the 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.Backup and Restoration

  3. On the Backup Settings tab of the Backup and Restoration page, click Edit in the Data Backup Settings section.

  4. Configure the following parameters and click Save.

    Parameter

    Description

    Data Backup Retention (Days)

    The number of days for which you want to retain backup files. Valid values: 7 to 730. Default value: 7. Unit: days.

    Backup Cycle

    The cycle based on which you want to perform a backup. You can select one or more days of the week.

    Note
    • For data security purposes, we recommend that you select at least two days of the week.

    • The system automatically generates log backup files. You can set the log backup frequency to Same as Data Backup or Every 30 Minutes based on your business requirements.

    • If you select the Snapshot Backup method, the backup frequency is fixed as Every 30 Minutes.

    Backup Method

    The backup method that you want to use. Valid values:

    Note
    • After you set the Backup Method parameter to Snapshot Backup, you cannot change the value of the parameter to Physical Backup.

    • After you change the backup method of your RDS instance to Snapshot Backup, you can still perform a physical backup to back up your RDS instance. For more information, see Perform a manual backup.

    Incremental Backup

    Specifies whether to enable the incremental backup feature.

    Note
    • You can turn on Incremental Backup only if you set the Backup Method parameter to Physical Backup.

    • The incremental backup feature is enabled by default. Automatic backups are performed based on the backup cycle that you specify. The backup cycle consists of three phases: a full backup, an incremental backup, and another incremental backup. For example, if you select Monday, Wednesday, and Friday of a week as a backup cycle, a full backup is performed on every Monday, and an incremental backup is separately performed on every Wednesday and Friday.

    • If the incremental backup feature is disabled, no incremental backups are performed. Instead, full backups are performed within the backup cycle. For example, if you select Monday, Wednesday, and Friday as a backup cycle, a full backup is separately performed on every Monday, Wednesday, and Friday.

    • A free quota on backup storage is provided for your RDS instance. If the total size of the backup files of your RDS instance does not exceed the free quota, no backup fees are generated. If the total size exceeds the free quota, you are charged for the excess backup storage that you use. For more information about the free quota and billing rules, see Backup storage pricing of an ApsaraDB RDS for SQL Server instance.

    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

    • Same as Data Backup

    • Every 30 Minutes

    The total size of log backup files does not vary based on the backup frequency that you specify.

    Note

    If you select the Snapshot Backup method, the backup frequency is fixed as Every 30 Minutes.

    Note

    The log backup retention period is the same as the value of the Data Backup Retention (Days) parameter. You cannot modify the log backup retention period on the Backup Settings tab.

Perform 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.Backup Instance

  3. In the dialog box that appears, configure the following parameters and click OK.

    Parameter

    Description

    Backup Policy

    Note

    Snapshot Backup is available only if the snapshot backup feature is enabled. For more information, see Enable snapshot backups for an ApsaraDB RDS for SQL Server instance.

    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.

      Note

      Full Backup is available only if you set the Backup Policy parameter to Physical Backup.

    Backup Policy

    This parameter is available only when you set the Select Backup Mode parameter 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 you set the Backup Policy parameter to Physical Backup.

      Note

      If 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.

  4. Optional. In the upper-right corner of the page, click the image..png icon. On the Task Center page, set the Task Type parameter to Manual Backup to view the progress of the backup task.

    Note

    After the backup task is completed, you can download the backup file on the Backup and Restoration page. Some RDS instances do not support the download of backup files. For more information, see Download the data backup files and log backup files of an ApsaraDB RDS for SQL Server instance.

FAQ

  1. Can I disable the data backup feature for my RDS instance?

    No, you cannot disable the data backup feature for your RDS instance. However, you can reduce the data backup frequency to as low as twice a week. The data backup retention period must be within the range of 7 days to 730 days.

  2. Can I disable the log backup feature for my RDS instance?

    No, you cannot disable the data backup feature for your RDS instance.

Related operations

Operation

Description

CreateBackup

Creates a data backup for an instance.

DescribeBackups

Queries the data backup files of an instance.

DescribeBackupPolicy

Queries the backup settings of an instance.

ModifyBackupPolicy

Modifies the backup settings of an instance.

DescribeBackupTasks

Queries the backup tasks of an instance.

DescribeBinlogFiles

Queries the binary log files of an instance.