You can use Database Backup (DBS) to automatically back up SQL Server databases to the cloud or restore SQL Server databases to ApsaraDB for RDS. DBS implements data migration as a software as a service (SaaS) platform. This topic describes how to restore an SQL Server database to ApsaraDB for RDS.

Prerequisites

  • An SQL Server database is backed up by using DBS and the storage type is set to OSS. For more information about how to back up SQL Server databases, see Back up SQL Server databases. For more information about how to select storage types, see Built-in storage and OSS.
  • A virtual private cloud (VPC) is created in the region where the destination database resides.
    Note For more information about how to create a VPC, see Create a default VPC network and VSwitch

Background information

DBS allows you to restore SQL Server databases to ApsaraDB for RDS, user-created on-premises databases, or user-created ECS-hosted databases. We recommend that you restore data to ApsaraDB for RDS for better performance in restoration speed, convenience, and security. The following table describes the differences between the three types of destination databases.

Destination database Description
RDS SQL Server
  1. You do not need to build an environment for the destination database. ApsaraDB RDS for SQL Server is compatible with ApsaraDB RDS for SQL Server S2012 Enterprise Edition and later.
  2. Alibaba Cloud VPC offers a network environment where you can quickly restore databases.
User-created ECS-hosted database
  1. You must build an environment for the destination database.
  2. Alibaba Cloud VPC offers a network environment where you can quickly restore databases.
User-created on-premises database
  1. You must build an environment for the destination database.
  2. Poor network conditions may lower the restoration speed.

Scenarios

  • DBS supports physical backup of data from SQL Server databases to ApsaraDB for RDS. This feature is ideal for the following scenarios:

    • To implement disaster recovery and restore databases after incorrect operations, you can restore data to a specific point in time to ApsaraDB for RDS.
    • You can back up historical data to ApsaraDB for RDS to free up the local storage space.
    • After you restore data from a database to a new database, you can perform certain offline and slow queries on the new database so that online business is not affected.
    • DBS allows you to restore databases to a specific point in time. In finance scenarios, you can perform statistical analysis on business data of a specific point in time.
  • After you use DBS to restore data to an ApsaraDB for RDS instance for disaster recovery, the instance can be retained for long-term use. You can also release the instance to reduce costs.

Procedure

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, click Manage in the Actions column corresponding to a backup schedule.
  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, set the parameters as described in the following table and click Next.
    Section Parameter Description
    N/A Task Name The name of the restoration task. DBS generates a task name. We recommend that you set the task name to something descriptive that makes it easy to identify. Task names do not have to be unique.
    Set Time Restored To Time Range Available to Restore The time range of backup sets available to restore. 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 specified by the Time Range Available to Restore parameter.
    Configure Destination Database Target database instance type Select New(Recommend) to create an ApsaraDB RDS for SQL Server instance. The ApsaraDB RDS for SQL Server instance to be created has the following default properties:
    • The default version of the instance to be created is the earliest Enterprise Edition compatible with the source database. The earliest version of ApsaraDB RDS for SQL Server that supports database restoration is ApsaraDB RDS for SQL Server 2012 Enterprise Edition. For example, if the source database version is SQL Server 2008, the default version of the instance to be created is ApsaraDB RDS for SQL Server 2012 Enterprise Edition. If the source database version is SQL Server 2016 Standard, the default version of the instance to be created is ApsaraDB RDS for SQL Server 2016 Enterprise Edition.
    • The default billing method of the instance to be created is pay-as-you-go.
    Database Location The location of the destination database. Default value: RDS Instance.
    Instance Region The region where you want to create the instance. By default, this parameter is set to China (Hangzhou). You can set this parameter based on your location to enable real-time database query.
    VPC The VPC where the destination database resides.
    DB InstanceClass The specifications of the instance to be created. The following specifications are available: 4 cores and 16 GB memory, 8 cores and 32 GB memory, 16 cores and 64 GB memory, and 32 cores and 128 GB memory. The default specifications are 4 cores and 16 GB memory. For more information about specifications and prices, see Pricing.
    Storage Space The storage space of the instance to be created. The default storage space is 500 GB. You can set this parameter to suit your actual business needs.
  6. Set Restore Mode to Restore Entire Instance and click Precheck.
  7. After you create the restoration task, click Restore Tasks in the left-side navigation pane. On the page that appears, view the task ID and restore progress of the restoration task.
  8. After the restoration task is complete, log on to the ApsaraDB for RDS console to view the ApsaraDB RDS for SQL Server instance that you created.
    Note For more information, see Quick Start of ApsaraDB RDS for SQL Server.