All Products
Search
Document Center

Data Management:Physically back up and restore an SQL Server database hosted on a third-party cloud or a self-managed SQL Server database

Last Updated:Apr 27, 2025

Data Disaster Recovery provides features such as full backup, incremental backup, and data restoration. This topic describes how to physically back up and restore an SQL Server database.

Prerequisites

  • The database version 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
    • The SQL Server database is an on-premises self-managed database or a self-managed database hosted on cloud servers. Cloud-managed databases are not supported.

    • The self-managed SQL Server database must run on the Windows operating system.

  • A backup gateway is installed. For more information, see Install a backup gateway.

    Note

    For information about backup methods, see Select the backup method and backup schedule type.

Usage notes

Do not configure two or more backup schedules for the same SQL Server database. Otherwise, exceptions may occur during restoration.

Create a backup schedule

For more information, see Create 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 a backup schedule

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, choose Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner of the DMS console and choose All Features > Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

  3. On the Backup Schedules page, find the ID of 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.

    image

    Section

    Parameter

    Description

    N/A

    Schedule Name

    The name of the backup schedule. Data Disaster Recovery automatically generates a name. If you want to specify a custom name, we recommend that you use a name that can help easily identify the backup schedule. Backup schedule names do not need to be unique.

    Backup Source Information

    Backup Mode

    The method used to back up data. By default, the backup method you selected when you purchased 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 and database instance must reside in the same region.

    Backup Gateway

    The backup gateway. For more information, see Install a backup gateway.

    Database Type

    The type of the database. Default value: SQL Server.

    Address

    The endpoint used to connect to the database you want to back up. Default value: localhost.

    Port Number

    The port used to connect to the database that you want to back up. Default value: 1433.

    Compliance warranty regarding cross-border data transfers

    Read and agree to the compliance commitment.

    Backup Destination Information

    Backup Storage Type

    The type of storage used to store the backup data. Valid values:

    • DBS Storage (recommended): Backup data is stored in Data Disaster Recovery without the need to create an Object Storage Service (OSS) bucket. You are charged based on the volume of your data that is stored in Data Disaster Recovery. For more information about the billing method, see Storage fees.

    • OSS For User: If you select this option, you must create an OSS bucket in the 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. Only the Standard storage class is supported.

    • If the volume of data to be backed up is large, we recommend that you purchase subscription storage plans to offset fees. Storage plans are more cost-effective than the pay-as-you-go billing method.

    Storage Encryption

    The method used to encrypt the stored data. Valid values:

    • Encrypted (recommended): AES-256 is used to encrypt the stored data.

      OSS supports the server-side encryption feature. 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. For more information, see Server-side encryption.

    • Non-encrypted: The stored data is not encrypted.

  5. In the Edit Backup Objects step, select the database or table that you want to back up in the Available section and click the right arrow to add the selected database or table to the Selected section. Then, click Next.

    Note
  6. In the Configure Backup Time step, configure the parameters, and then click Next in the lower-right corner of the page. The following table describes the parameters.

    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 configure the Full Data Backup Recurrence, Start At, and incremental backup-related parameters.

    Full Data Backup Recurrence

    The days of the week on which Data Disaster Recovery runs the backup schedule.

    Start At

    The start time of the backup.

    Note

    If a previous full data backup is incomplete at the start time of the next backup, Data Disaster Recovery skips the next backup.

    Incremental Backup

    Specifies whether to enable incremental backup. If you enable incremental backup, Data Disaster Recovery performs regular incremental backup operations based on the value of the Incremental Backup Interval parameter.

    Incremental Backup Interval

    The interval at which incremental backups are performed. If you set the interval to 10 minutes, Data Disaster Recovery 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: Data Disaster Recovery does not automatically delete the archived redo log files that are backed up.

    • Disable: Data Disaster Recovery automatically deletes the archived redo log files that are backed up. By default, archived redo log files backed up seven days ago are deleted.

    Note

    If you want to change the default retention period of the archived redo log files that are backed up, contact technical support. For example, you can contact technical support to help you change the retention period 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 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.

    SQL server预检查

Restore backup data

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, choose Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner of the DMS console and choose All Features > Security and Specifications (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

  3. On the Backup Schedules page, find the backup schedule you want to manage and click Manage in the Actions column.

  4. On the Configure Task page, click Restore Database in the upper-right corner.

  5. In the Set Time Restored To step, configure the parameters, and then click Next. The following table describes the parameters.

    image.png

    Section

    Parameter

    Description

    N/A

    Task Name

    The name of the backup schedule. Data Disaster Recovery automatically generates a name. If you want to specify a custom name, we recommend that you use a name that can help easily identify the backup schedule. Backup schedule names do not need to be unique.

    Set Time Restored To

    Time Range Available to Restore

    The time range available for source database restoration. Data Disaster Recovery displays the available time range.

    Restore To

    The point in time to which you want to restore the source database. The value must be within the time range specified by the Time Range Available to Restore parameter.

    Configure Destination Database

    Instance Region

    The region in which the destination database resides, which is also the region in which the backup gateway is installed.

    Backup Gateway

    The backup gateway. For more information, see Install a backup gateway.

    Database Type

    The type of the destination database. Default value: SQL Server.

    Address

    The endpoint used to connect to the destination database. Default value: localhost.

    Port Number

    The port used to connect to the destination database. Default value: 1433.

    Compliance warranty regarding cross-border data transfers

    Read and agree to the compliance commitment by selecting the check box.

  6. In the Available section, select the destination database and click the right arrow to add the destination database to the Selected section on the right. Then, click Precheck.

    To view the database restoration progress, click Restore Tasks in the left-side navigation pane.

    Note

    The restoration duration varies based on the backup schedule specifications and database size. The higher the backup schedule specifications, the faster the restoration. For more information, see Performance tests on logical backup and physical backup.

FAQ

Why is the available backup object section empty when I configure a backup schedule even if the backup gateway is installed?

The account used to perform backup operations does not have the required permissions. You must assign the Sysadmin role to the NT AUTHORITY\SYSTEM account. To assign the role, execute the following SQL statements:

ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM]
GO

What do I do if the "DBS Agent Connect" error is reported when I test the database connection?

Perform the following steps to troubleshoot and resolve the issue:

  1. Check whether the status of the backup gateway is normal in the console.

  2. Check whether the backup gateway started as expected. For more information, see Install a backup gateway.

  3. Check whether the backup gateway for the SQL Server is installed in the region specified in the console.

  4. Check whether the version of the Java Runtime Environment (JRE) or Java Development Kit (JDK) installed on the server is correct. For more information, see Install a backup gateway.

  5. Check the network or routing settings.

Does insufficient remaining space of the database server affect the backup schedule?

No.

  • Backup data is stored in OSS, so it does not occupy the storage space of the database server.

  • The backup process only consumes minimal CPU and network resources and is independent of the storage space of the database server.