Database Backup (DBS) provides features such as full backup, incremental backup, and data restoration. This topic describes how to use the physical backup method to back up an SQL Server database.

Prerequisites

  • The version of the database is SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008R2, SQL Server 2005, or SQL Server 2000.
    Note Only self-managed SQL Server databases that are deployed on premises or on cloud servers are supported. ApsaraDB RDS for SQL Server instances are not supported.
  • A backup gateway is added. For more information, see Add a backup gateway.
    Note For more information about backup methods, see Backup methods.

Create a backup schedule

For more information about how to create a backup schedule, see Purchase a backup schedule.
Note When you purchase a backup schedule, set the Database Type parameter to SQL Server and the Backup Method parameter to Physical Backup.

Configure a backup schedule

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page, select a region in the upper-left corner.
  3. On the Backup Schedules page, find the backup schedule that you want to configure, and click Configure Backup Schedule in the Actions column.
  4. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, set the parameters as required, and click Next in the lower-right corner of the page.
    Section Parameter Description
    N/A Schedule Name The name of the backup schedule. DBS generates a backup schedule name. We recommend that you set a descriptive name that makes the backup schedule easy to identify. Backup schedule names do not have to be unique.
    Backup Source Information Backup Mode The method that is used to back up data. By default, the backup method that you selected when you purchased the backup schedule is used. In this example, Physical Backup is used.
    Instance Region

    The region where the database that you want to back up is deployed. The backup gateway must reside in the same region.Backup Gateways).

    Backup Gateway The backup gateway that you want to install to back up data. For more information, see Add a backup gateway.
    Database Type The engine of the database that you want to back up. Default value: SQLServer.
    Address The endpoint that is used to connect to the database that you want to back up. Default value: localhost.
    Port Number The port number that is used to connect to the database that you want to back up. Default value: 1433.
    Backup Destination Information Backup Storage Type The type of storage that is used to back up data. Valid values:
    • DBS Storage (recommended)
    • OSS For User
    Note For more information, see Built-in storage and OSS. In this example, select DBS Storage (recommended). If you select OSS For User, you must set the OSS Bucket Name parameter.
    Storage Encryption The method that is used to encrypt the backup data. Valid values:
    • Encrypted (recommended): DBS uses AES-256, one of the advanced encryption standard ciphers, to encrypt the stored data.

      The server-side encryption feature is used in OSS. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.

    • Non-encrypted: The backup data is not encrypted.
    Configure a backup schedule for an SQL Server database
  5. In the Edit Backup Objects step, find the database or table that you want to back up in the Available section. Click the right arrow to add the selected database or table to the Selected section. Then, click Next.
    Note
    • If the Available section is empty, troubleshoot the permission problem on the backup gateway. For more information, see FAQ.
    • If you back up an entire database, the permission data and stored procedures are also backed up.
  6. In the Configure Backup Time step, set the parameters as required, and click Next in the lower-right corner of the page.
    Parameter Description
    Full-scale Backup Frequency The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.
    Note If you select Periodic Backup, you must set the Full Data Backup Recurrence, Start At, and Incremental real-time backup parameters.
    Full Data Backup Recurrence The days of the week on which DBS runs the backup schedule.
    Start At The start time of the backup.
    Note If a previous full data backup is not finished at the start time of the next backup, DBS skips the next backup.
    Incremental real-time backup Specifies whether to enable incremental backup. After incremental backup is enabled, DBS performs regular incremental backup operations based on the value of the Transaction Log backup interval parameter.

    This parameter is displayed only when you set the Full-scale Backup Frequency parameter to Periodic Backup.

    Transaction Log backup interval The interval at which incremental backups are performed. If you set the interval to 10 minutes, DBS performs an incremental backup every 10 minutes.
    Does not automatically delete backed up incremental Specifies whether to automatically delete the archived redo log files that are backed up. Valid values:
    • Enable: The archived redo log files that are backed up are not automatically deleted.
    • Disable: DBS automatically deletes the archived redo log files that are backed up. By default, the archived redo log files that were backed up seven days ago are deleted.
    Note If you want to change the default time period after which the archived redo log files are automatically deleted, submit a ticket. For example, you can change the default time period from seven days to 14 days.
    Enable compression Specifies whether to enable compression during backup. Valid values:
    • Enable (recommended): Data is compressed during backup to reduce storage space.
    • Disable: Data is not compressed during backup.
  7. In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.
    If you set the Incremental real-time backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data. For more information about the lifecycle rules of backup data, see How do I manage the lifecycle rules of backup sets?.
  8. After the configurations are complete, click Precheck in the lower-right corner of the page.
  9. If the Precheck Passed message appears, click Start Task.
    The Precheck message
    Note When the status of the backup schedule changes to Running, the backup schedule takes effect. You can view the backup task on the Backup Schedules page. For more information, see View backup schedules.

What to do next

FAQ

The backup gateway is installed. Why is the Available section empty when I configure a backup schedule?

The account that performs backup operations does not have required permissions. You must assign the Sysadmin role to the NT AUTHORITY\SYSTEM account. You can execute the following SQL statement to assign the Sysadmin role to the NT AUTHORITY\SYSTEM account:
  • SQL statements
    ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM]
    GO