This topic describes how to back up an 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 storage capacity that you purchased during instance creation. Each RDS instance is allocated with a free quota for backup storage. If your backup storage usage exceeds the free quota, you are charged additional fees. We recommend that you specify a proper backup cycle based on your business requirements to make the best use of the free backup quota. 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 of backup storage. For more information, see Pricing, billing items, and billing methods.
  • You must be familiar with the pricing of backup storage, see the pricing information at ApsaraDB for RDS.
  • Do not execute data definition language (DDL) statements during a backup. These statements trigger locks on tables, and the backup may fail as a result of the 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 required backup files 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 and incremental physical backups are supported. However, logical backups are not supported.
  • Automatic backups are 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. This continues until you modify the backup policy.
    • 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 backups are supported. You can back up one or more databases of your RDS instance.
  • SQL Server shrinks transaction logs during each backup. You can log on to the ApsaraDB for RDS console, find your RDS instance, and on the Backup and Restoration page click Shrink Transaction Log to manually shrink transaction logs.
  • The system backs up the binary logs of your RDS instance based on the specified backup frequency. Two backup frequencies are provided:
    • Same as Data Backup
    • Every 30 Minutes

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

  • The log backup function cannot be disabled.
  • You can specify the log backup retention period, which must be within the range 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 your RDS instance to a point in time within the last 30 minutes in the event of SSD damage or other unexpected failures. This applies to the RDS Basic Edition.

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 left-side navigation pane, click Instances. In the top navigation bar, select the region where the target RDS instance resides.
    Select a region
  3. Find the target 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 and then the Edit button.
  6. Configure the following parameters and click OK.
    Parameter Description
    Data Backup Retention (Days) The number of days for which you want to retain data backup files. Valid values: 7 to 730. Unit: days. Default value: 7.
    Backup Cycle The cycle to create backups. You can select one or more days of the week.
    Note To ensure data security, 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.
    Backup Frequency
    • Same as Data Backup
    • Every 30 Minutes

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

    Log Retention Period (Days) The number of days for which you want to retain log backup files. The log backup retention period is the same as the period specified by the Data Backup Retention parameter.

Manually back up your RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the target RDS instance resides.
    Select a region
  3. Find the target instance and click the instance 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 databases from the left-side list and then click the > button to move them to the right-side list. If no databases are created on the RDS instance, you must create databases before you back up the RDS instance. For more information, see Create a database for an ApsaraDB RDS for SQL Server instance.
    Single-Database Backup
  6. In the upper-right corner of the page, click the Task Progress icon to view the progress of the backup task.
    View the progress of the backup task
    Note After the backup task is complete, you can go to the Backup and Restoration page to download the backup file. Some RDS instances do not support the download of backup files. For more information, see Download data and log backup files from an ApsaraDB RDS for SQL Server instance.Download a backup file

FAQ

  1. Can I disable the data backup function of my RDS instance?

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

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

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

References

Operation Description
Create backup set Creates a backup for an ApsaraDB for RDS instance.
Query backup sets Queries the backup files of an ApsaraDB for RDS instance.
Query backup settings Queries the backup settings of an ApsaraDB for RDS instance.
Modify backup settings Modifies the backup settings of an ApsaraDB for RDS instance.
Query backup tasks Queries the backup tasks of an ApsaraDB for RDS instance.
Query binary logs Queries the log backup files of an ApsaraDB for RDS instance.