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

Precautions

  • Backup files do not occupy the space on your local disks. Each RDS instance is allocated with a free tier of backup space that is used to store backup files. If your usage exceeds the capacity of the free tier, you must pay for the extra backup space that you use. We recommend that you specify a backup cycle based on your business requirements to make the best use of the allocated backup space. For more information, see View the quota of free backup space for an RDS SQL Server instance.
  • You must be familiar with the billing methods and billable items. For more information, see Pricing, billing items, and billing methods.
  • You must be familiar with the billing of backup space usage. For more information, visit ApsaraDB for RDS pricing.
  • Do not perform data definition language (DDL) operations during a backup. If you do so, the backup may fail due to table locks.
  • We recommend that you back up your RDS instance during off-peak hours.
  • If the data volume is large, backing up your RDS instance may require a long time.
  • Backup files are retained based on the specified retention period. We recommend that you download the backup files that you require to your computer before they are deleted.
  • You cannot manually delete backup files.

Overview of data and log backups

Database engine Data backup Log backup
SQL Server
  • Full physical backup and incremental physical backup are supported. Logical backup is not supported.
  • Automatic backup is performed based on a specific cycle. Each cycle consists of three phases: full backup, incremental backup, and incremental backup again.
    • If a full backup is performed on Monday, an incremental backup is separately performed on Tuesday and Wednesday. Then, a full backup is performed on Thursday, and an incremental backup is separately performed on Friday and Saturday.
    • If a manual full backup is performed within a backup cycle, the manual full backup is followed by two consecutive automatic incremental backups.
  • Single-database backup is supported. You can back up the data of one or more databases on your RDS instance.
  • SQL Server shrinks transaction logs during each backup. You can log on to the ApsaraDB for RDS console, find the target RDS instance, and on the Backup and Restoration page click Shrink Transaction Log to manually shrink transaction logs.
  • The system backs up binary logs based on the specified backup cycle:
    • Same as Data Backup
    • Every 30 Minutes

    The total size of binary log files remains the same no matter which log backup cycle you select.

  • The log backup function cannot be disabled.
  • You can specify the log retention period, which must be within the range from 7 days to 730 days.
  • You can download binary log files.
Note If the Backup Frequency parameter is set to Every 30 Minutes, you can restore your RDS instance to a point in time within the last 30 minutes in the event of SSD damage or other unexpected failures.

Configure a backup policy to automatically back up your RDS instance

ApsaraDB for RDS automatically backs up your RDS instance based on the specified backup policy.

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.Select a region
  3. Find the target RDS instance and click its ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. On the Backup and Restoration page, click the Backup Settings tab and then the Edit button.
  6. In the Backup Settings dialog box, configure the following parameters and click OK.
    Parameter Description
    Data Retention Period The period to retain data. Valid values: 7 to 730. Default value: 7. Unit: days.
    Backup Cycle Set the RDS backup cycle to run at least twice a week in order to ensure data security.
    Note For data security purposes, we recommend that you back up your RDS instance at least twice a week.
    Backup Time The hour at which you want to create a backup. We recommend that you schedule the backup to run during an off-peak hour.
    Backup Frequency
    • Same as Data Backup
    • Every 30 Minutes

    The total size of binary log files remains the same no matter which log backup cycle you select.

    Log Retention Period The period to retain binary logs. The log retention period is the same as the data retention period.

Manually back up your RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.Select a region
  3. Find the target RDS instance and click its ID.
  4. In the upper-right corner of the page, click Back Up Instance.
  5. Specify a backup mode and a backup policy. Then, click OK.
    Note If you select the Full Backup mode and the Single-Database Backup policy, you must select the databases you want to back up from the left-side list and then click > to add them to the right-side list. If no databases are created on the RDS instance, you must create a database. For more information, see Create a database for an RDS SQL Server instance.
    Single-Database Backup
  6. In the upper-right corner of the page, click the Task Progress icon to view the status of the backup task.View Task Progress
    Note After the backup task is complete, you can go to the Backup and Restoration page to download the data backup file. Some RDS instances do not support the download of data backup files. For more information, see Download the data backup files and log backup files of an RDS SQL Server instance.Download backup

FAQ

  1. Can I disable the data backup function for an ApsaraDB RDS for SQL Server instance?

    No, you cannot disable the data backup function of your ApsaraDB RDS for SQL Server instance. The data backup function must be enabled. However, you can lower the backup frequency to as low as twice a week. The data retention period must be within the range from 7 days to 730 days.

  2. Can I disable the log backup function for an ApsaraDB RDS for SQL Server instance?

    No, you cannot disable the log backup function of your ApsaraDB RDS for SQL Server instance. The log backup function must be enabled.

Related operations

Operation Description
CreateBackup Creates a data backup for an ApsaraDB RDS for SQL Server instance.
DescribeBackups Queries the data backup files of an ApsaraDB RDS for SQL Server instance.
DescribeBackupPolicy Queries the backup settings of an ApsaraDB RDS for SQL Server instance.
ModifyBackupPolicy Modifies the backup settings of an ApsaraDB RDS for SQL Server instance.
DescribeBackupTasks Queries the backup tasks of an ApsaraDB RDS for SQL Server instance.
DescribeBinlogFiles Queries the binary log files of an ApsaraDB RDS for SQL Server instance.