All Products
Search
Document Center

Database Backup:Restore an SQL Server database from a physical backup

Last Updated:Jan 12, 2024

This topic describes how to restore an SQL Server database from a physical backup to a self-managed database by using Database Backup (DBS). This operation is suitable for scenarios such as database restoration after data is accidentally deleted from a database and historical data analysis.

Supported database types

Destination database

Description

Self-managed database on an Elastic Compute Service (ECS) instance

  • You must build an environment for the destination database.

  • You can restore a database by using Alibaba Cloud Virtual Private Cloud (VPC). VPC supports more secure and stable network connections. For more information, see What is a VPC?

Self-managed database in a data center

  • You must build an environment for the destination database.

  • The database restoration speed may be limited by the network.

Prerequisites

  • The SQL Server database that you want to restore is backed up. For more information, see Back up an SQL Server database.

  • A backup gateway is installed on the server on which the database to be restored resides. For more information, see Install a backup gateway.

  • The version of the database to be restored is the same as that of the database that is backed up.

    Note

    For more information about the versions of SQL Server databases that can be backed up and restored by using DBS, see Database engines and features.

Procedure

  1. Log on to the Database Backup (DBS) console.

  2. In the left-side navigation pane, click Backup Schedules.

  3. On the Backup Schedules page, find the backup schedule that 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 of the Create Restore Task wizard, configure the parameters that are described in the following table and click Next.

    image.png

    Section

    Parameter

    Description

    N/A

    Task Name

    The name of the backup task. DBS automatically generates a task name. We recommend that you specify a name that can help you identify the task. You do not need to specify a unique task name.

    Set Time Restored To

    Time Range Available to Restore

    The time range that is available to restore the source database. DBS 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 that is 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 that is installed for restoring the source database to the destination database. For more information about how to install a backup gateway, see Install a backup gateway.

    Database Type

    The type of the destination database. The default value is SQL Server.

    Address

    The endpoint that is used to connect to the destination database. The default value is localhost.

    Port Number

    The port that is used to connect to the destination database. The default value is 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.

    You can click Restore Tasks in the left-side navigation pane to view the database restoration progress.

    Note

    The duration of the restoration depends on the specification of the backup schedule and the size of the database. Less time is required for the restoration of a backup schedule with higher specifications. For more information, see Performance tests on backup and restoration.

Related operations

  • You can also directly create, start, or view a restoration task by calling an API operation. For more information, see CreateRestoreTask, StartRestoreTask, or DescribeRestoreTaskList.

  • If the backup data at the specified point in time does not meet your business requirements, you can click Start Full Data Backup in the upper-right corner of the Full Data page to manually back up the database. After the backup is complete, configure a restoration task to restore the database to the point in time of the latest full backup.

  • If an exception or error occurs in the restoration task, refer to Common Errors and Troubleshooting for troubleshooting.