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.
- 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
Note For more information about how to create a VPC, see Create a default VPC network and vSwitch
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.
|RDS SQL Server||
|User-created ECS-hosted database||
|User-created on-premises database||
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.
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules.
- On the Backup Schedules page, click Manage in the Actions column corresponding to a backup schedule.
- On the Configure Task page, click Restore Database in the upper-right corner.
- 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.
- Set Restore Mode to Restore Entire Instance and click Precheck.
- 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.
- 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.