Physical backup and recovery for self-managed SQL Server

更新时间:
复制 MD 格式

Data Disaster Recovery provides full backup, incremental backup, and data restoration capabilities. This article describes the steps to configure physical backups for SQL Server.

Prerequisites

  • The database version is SQL Server 2019, 2017, 2016, 2014, 2012, 2008 R2, 2005, or 2000.

    Important
    • This feature supports only self-managed databases deployed on-premises or on cloud servers. It does not support cloud-managed databases.

    • Only self-managed databases on Windows are supported.

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

    Note

    For more information about backup methods, see Guide to selecting backup methods and backup schedule specifications.

Limitations

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

Create a backup schedule

Follow the instructions in Create a backup schedule.

Note

When you purchase a backup schedule, select SQL Server for Database Type and Physical backup for Backup Mode.

Configure a backup schedule

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

  2. In the top navigation bar, choose Security and disaster recovery (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 disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

  3. Find the target backup schedule and click Configure Backup Schedule in the Actions column.

  4. On the Configure Backup Source and Destination page, set the backup source and destination, and click Next.

    Section

    Parameter

    Description

    N/A

    Schedule name

    DBS automatically generates a name for the task. We recommend specifying a descriptive name for easier identification. The name is not required to be unique.

    Backup source

    Backup mode

    This defaults to the backup method that you selected when you created the backup schedule. This topic uses physical backup as an example.

    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

    Select the target backup gateway. For more information about how to add a backup gateway, see Install a backup gateway.

    Database type

    By default, this is set to SQL Server.

    Endpoint

    The endpoint of the database that you want to back up. The default value is localhost.

    Port number

    The port number used to connect to the database. The default value is 1433.

    Cross-border data transfer compliance commitment

    Read the compliance commitment and select the checkbox to confirm your agreement.

    Backup destination

    Backup storage type

    The type of storage for your backup data. Valid values:

    • DBS Storage (recommended): Your backup data is stored in the built-in storage of DBS. You do not need to create a bucket. You are charged based on the amount of data stored in DBS. For more information about billing, see Storage fees.

    • OSS For User: You must create a bucket in Object Storage Service (OSS) in advance. For more information, see Create a bucket.

    Note
    • This topic uses DBS Storage as an example. If you select OSS For User, you must also configure the OSS Bucket Name parameter. Only the OSS Standard storage class is supported.

    • For large amounts of data, purchasing a subscription DBS storage plan is more cost-effective than the pay-as-you-go billing method.

    Storage encryption

    Select a storage encryption method. Valid values:

    • Encrypted (recommended): Uses the industry-standard AES-256 algorithm to encrypt data at rest.

      Object Storage Service (OSS) uses server-side encryption to automatically encrypt objects on upload and decrypt them on download. For more information, see Server-side encryption.

    • Non-encrypted: Disables encryption.

  5. On the Configure Backup Objects page, move the databases or tables that you want to back up to the Selected Database Objects box, and then click Next.

    Note
    • If the Available list is empty, check the permissions of the backup gateway. For more information, see Troubleshoot common DBS errors.

    • When you back up an entire database, DBS also backs up its permissions and stored procedures.

  6. On the Configure Backup Time page, set the backup frequency and policy, and click Next.

    Parameter

    Description

    Full backup frequency

    Select Periodic Backup or Single Backup.

    Note

    If you select Periodic Backup, you must also configure parameters such as Full Backup Period, Start Time, and incremental backup.

    Full backup period

    Select the days of the week to perform the backup.

    Start time

    Select the start time for the backup.

    Note

    If a previous full backup is still in progress at the specified start time, the current backup task is skipped.

    Incremental backup

    Enables or disables incremental backup. If enabled, the system performs scheduled incremental backups based on the Incremental Backup Interval.

    Incremental backup interval

    Specify the interval for incremental backups, such as every 10 minutes.

    Enable compression

    Specifies whether to enable compression. Valid values:

    • Enable: recommended. Data is compressed during backup to reduce storage space.

    • Disable: Data is not compressed during backup.

  7. On the Edit Lifecycle page, specify the retention period for full backup data in DBS Storage.

    If you enabled incremental backup in the previous step, you must also configure the retention period for incremental backup data. For more information about the backup data lifecycle, see Manage the lifecycle of backup data.

  8. After the preceding configurations are complete, click Precheck in the lower-right corner of the page.

  9. In the precheck dialog box, after the precheck passes, click Start Immediately.

Restore data

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

  2. In the top navigation bar, choose Security and disaster recovery (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 disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

  3. Find the target backup schedule and click Manage in the Actions column.

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

  5. On the Configure Restore Point page, configure the following parameters, and then click Next.

    Section

    Parameter

    Description

    N/A

    Restore task name

    DBS automatically generates a name for the task. We recommend specifying a descriptive name for easy identification. The name does not have to be unique.

    Restore point in time

    Recoverable time range

    The system displays the recoverable time range.

    Selected restore time

    Select the point in time to which you want to restore the data. The time must be within the recoverable time range.

    Restore destination

    Instance region

    Select the region of the destination instance. This is also the region of the destination backup gateway.

    Backup gateway

    Select the destination backup gateway. For information about how to add a backup gateway, see Install a backup gateway.

    Database type

    By default, this is set to SQL Server.

    Endpoint

    The connection address of the destination database. The default value is localhost.

    Port number

    The port number used to connect to the destination database. The default value is 1433.

    Cross-border data transfer compliance commitment

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

  6. Select the entire instance, add it to the Selected Database Object list, and then click Precheck and Start.

    You can monitor the data restoration progress on the Restore Tasks tab.

    Note

    The restoration time depends on the backup schedule specifications and the size of the database. Higher specifications result in faster restoration. For more information, see Performance test results for logical and physical backups.

FAQ

Why is the source database object list empty when I configure a backup schedule, even though the backup gateway is installed correctly?

This issue occurs if you select Physical backup and choose to back up a subset of databases or tables, and the Source Database Object list on the left is empty.

The backup account has insufficient permissions. You must grant the sysadmin role to the NT AUTHORITY\SYSTEM account. You can run the following SQL command or use the graphical user interface (GUI) to grant the role:

  • SQL command

    ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM]
    GO
  • GUI: In SQL Server Management Studio (SSMS), expand Security > Logins. Right-click NT AUTHORITY\SYSTEM and choose Properties. On the Server Roles tab, select sysadmin and click OK.

What do I do if the DBS Agent Connect diagnostic fails during a connection test?

The diagnostic result shows that the DBS Agent Connect check failed, with the following error message: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)".

To resolve this error, follow these steps:

  1. In the console, check if the backup gateway status is abnormal.

  2. The backup gateway may not have started. For more information, see Install a backup gateway.

  3. Verify that the region of the installed backup gateway matches the region specified in the console.

  4. The JRE or JDK version installed on the server may be incorrect. For more information, see Install a backup gateway.

  5. The gateway may be offline due to network connectivity or routing issues.