This topic describes how to back up the data of an RDS for SQL Server instance. You can specify a data and log backup cycle, according to which the system automatically backs up data and logs. Alternatively, you can manually back up the instance data.

Precautions

  • The backup files occupy the backup space of the RDS instance. If the used backup space exceeds the quota of free backup space, additional fees are incurred. For more information, see View the quota of free backup space for an RDS for SQL Server instance.
  • For information about the billing method and billable items, see Billing methods and billable items.
  • For information about the pricing of backup space, see ApsaraDB RDS for MySQL pricing.
  • Do not perform DDL operations during the backup. Otherwise, tables are locked and consequently the backup fails.
  • Back up data and logs during off-peak hours.
  • If the data volume is large, the backup may take a long time.
  • Backup files are retained for a specified time period. Download the backup files to your computer before they are deleted.
  • You cannot manually delete backup files.

Overview

DB engine Data backup Log backup
SQL Server
  • Full physical backup and incremental physical backup are supported, but logical backup is not supported.
  • Automatic backup is performed by cycle. A cycle consists of three phases: full backup, incremental backup, and incremental backup again.
    • For example, if a full backup is performed on Monday, then an incremental backup is performed on Tuesday and Wednesday separately. Next, a full backup is performed on Thursday, and an incremental backup is performed on Friday and Saturday separately.
    • If a manual full backup is performed within a backup cycle, then the manual full backup is followed by two automatic consecutive incremental backups.
  • Single-database backup is supported. You can back up the data of one or more databases in an RDS instance.
  • SQL Server shrinks transaction logs during each backup. You can log on to the 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 automatically generates log backup files. You can specify the log file backup frequency in the RDS console:
    • Same as Data Backup
    • Every 30 Minutes

    The log file size remains the same no matter which backup frequency you select.

  • The log backup function cannot be disabled.
  • You can specify the log retention period, which ranges from 7 days to 730 days.
  • You can download log backup files.
Note When the Backup Frequency parameter is set to Every 30 Minutes for an RDS instance, you can restore the instance to the time point when log backup files of the last 30 minutes were generated, in case that the instance becomes abnormal due to SSD damage or other faults.

Set a backup policy for automatic backup

ApsaraDB for RDS can automatically back up databases according to the backup policy you set.

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. On the Backup and Restoration page, click the Backup Settings tab. On the Backup Settings tab, click Edit.
  6. In the Backup Settings dialog box, set the backup parameters and click OK. The following table describes the parameters.
    Parameter Description
    Data Retention Period The data retention period spans from 7 days to 730 days. The default retention period is 7 days.
    Backup Cycle Select one or more workdays.
    Backup Time You can select any time period, which is measured in the unit of hour. We recommend that you select a time period during off-peak hours.
    Backup Frequency Valid values:
    • Same as Data Backup
    • Every 30 Minutes

    The log file size remains the same no matter which backup frequency you select.

    Log Retention Period The value of this parameter is the same as that of the Data Retention Period parameter.

Manually back up data

  1. Log on to the RDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
  4. In the upper-right corner of the Basic Information page, click Back Up Instance.
  5. In the Back Up Instance dialog box, set the backup parameters and click OK.备份实例
    Note If you set the Select Backup Mode parameter to Full Backup and the Backup Policy parameter to Single-Database Backup, select a database from the left and click > to add the database to the list on the right. If the RDS instance does not have a database, you must create databases according to Create a database for an RDS for SQL Server instance.
    单库备份

FAQ

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

    No, the data backup function must be enabled. However, you can lower the backup frequency to at least two times a week.

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

    No, the log backup function must be enabled.

APIs

API Description
CreateBackup Used to create a backup set for an RDS instance.
DescribeBackups Used to query the backup set list of an RDS instance.
DescribeBackupPolicy Used to query the backup settings of an RDS instance.
ModifyBackupPolicy Used to modify the backup settings of an RDS instance.
DescribeBackupTasks Used to query the backup task list of RDS instance.
DescribeLogBackupFiles Used to query the log backup files of an RDS instance.