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 installed. For more information, see Add a backup gateway.
    Note For more information about backup methods, see Backup methods.

Create a backup schedule

Create a backup schedule. For more information, see Purchase a backup schedule.
Note When you purchase a backup schedule, set the Data Source Type parameter to SQL Server and the Backup Method parameter to Physical Backup.

Configure the 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, configure the backup source and destination. Then, click Next in the lower-right corner of the page.
    SectionParameterDescription
    N/ASchedule NameThe name of the backup schedule. DBS generates a backup schedule name. We recommend that you set a descriptive name that is easy to identify. Backup schedule names do not have to be unique.
    Backup Source InformationBackup ModeThe method that is used to back up data. By default, the backup method that you select when you purchase the backup schedule is used. In this example, the physical backup method is used.
    Instance Region

    The region in which the database that you want to back up resides. The backup gateways must reside in the same region.

    Backup GatewayThe backup gateway that is installed to back up data. For more information about how to install a backup gateway, see Add a backup gateway.
    Database TypeThe type of the database that you want to back up. Default value: SQLServer.
    AddressThe endpoint that is used to connect to the database that you want to back up. Default value: localhost.
    Port NumberThe port number that is used to connect to the database that you want to back up. Default value: 1433.
    Backup Destination InformationBackup Storage TypeThe type of storage that is used to store the backup data. Valid values:
    • DBS Storage (recommended): Backup data is stored in DBS without requiring you to create storage space. You are charged based on the volume of your data that is stored in DBS. For more information about the billing method, see Storage fees.

      To reduce storage costs, we recommend that you use subscription storage plans. For more information, see Use storage plans.

    • OSS For User: You must create a bucket in the Object Storage Service (OSS) console in advance. For more information, see Create buckets.
    Note In this example, DBS Storage (recommended) is selected. If you select OSS For User, you must configure the OSS Bucket Name parameter, and only the Standard storage class is supported.
    Storage EncryptionThe method that is used to encrypt the stored data. Valid values:
    • Encrypted: recommended. DBS uses AES-256 to encrypt the stored data. AES-256 is one of the advanced encryption standard ciphers.

      The server-side encryption feature is used in OSS. When you upload an object to OSS, 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 physical 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 that are described in the following table and click Next in the lower-right corner of the page.
    ParameterDescription
    Full-scale Backup FrequencyThe 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 backup-related parameters.
    Full Data Backup RecurrenceThe days of the week on which DBS runs the backup schedule.
    Start AtThe start time of the backup.
    Note If a previous full backup is not finished at the start time of the next full backup, DBS skips the next full backup.
    Incremental BackupSpecifies 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 if you set the Full-scale Backup Frequency parameter to Periodic Backup.

    Transaction Log backup intervalThe 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 incrementalSpecifies 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 compressionSpecifies whether to enable compression during backup. Valid values:
    • Enable: recommended. Data is compressed during a backup to reduce storage space.
    • Disable: Data is not compressed during a 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 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 preceding 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 state 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 a backup schedule.

What to do next

FAQ

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

A: 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 statements to assign the Sysadmin role to the NT AUTHORITY\SYSTEM account:
  • SQL statements
    ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM]
    GO