You can use Database Backup (DBS) to automatically back up SQL Server databases to Alibaba Cloud and then restore the SQL Server databases to ApsaraDB RDS. This way, you can migrate databases to a software as a service (SaaS) platform. This topic describes how to restore an SQL Server database to ApsaraDB RDS.
- An SQL Server database is backed up by using DBS and the Backup Storage Type parameter in the backup schedule configuration is set to OSS For User. For information about how to back up SQL Server databases, see Back up an SQL Server database. For information about how to specify a storage type based on your business requirements, see Built-in storage and OSS.
- A virtual private cloud (VPC) is created in the region where the destination database
Note For information about how to create a VPC, see Default VPC and default vSwitch.
|Disaster recovery in the cloud||To implement disaster recovery or restore databases after accidental operations, you can restore data that is backed up at all points in time to an ApsaraDB RDS for SQL Server database.|
|Archiving data to the cloud||You can dump historical data to an ApsaraDB RDS for SQL Server database. This way, you can resolve issues that are caused due to insufficient space of your on-premises storage devices.|
|Data warehouse planning||After you restore data from a database to a new database, you can perform specific offline queries and slow queries on the new database. This way, these queries do not affect your online business in a negative manner.|
|Financial inventory||DBS allows you to restore a database to a specific point in time. In finance scenarios, you can perform statistical analysis based on business data of a specific point in time.|
After you use DBS to restore data to an ApsaraDB RDS for SQL Server database for emergency disaster recovery, the ApsaraDB RDS for SQL Server database can be retained for a long period of time. You can also release the ApsaraDB RDS for SQL Server database to reduce costs.
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules.
- On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.
- 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, configure the parameters to specify a restoration
task. Then, click Next.
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. Task names do not need to be unique. Set Time Restored To Time Range Available to Restore The time range in which available backup sets are created. 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 Target database instance type The method that is used to specify a destination database instance. To create an ApsaraDB RDS for SQL Server instance as the destination database instance, set the value to New (Recommend). The ApsaraDB RDS for SQL Server instance to be created use the following default settings:
- The default version of the destination instance is the earliest version of ApsaraDB RDS for SQL Server Enterprise Edition that is compatible with the source database. The earliest version that ApsaraDB RDS for SQL Server supports for database restoration is SQL Server 2012 Enterprise Edition. For example, if the version of the source database is SQL Server 2008, the default version of the destination instance is ApsaraDB RDS for SQL Server 2012 Enterprise Edition. If the version of the source database is SQL Server 2016 Standard, the default version of the destination instance is ApsaraDB RDS for SQL Server 2016 Enterprise Edition.
- The default billing method of the destination instance is the pay-as-you-go billing method.
Database Location The location of the destination database. In this example, the value of this parameter is set to RDS Instance. For more information, see Supported locations for the destination database. Instance Region The region where the destination database is deployed. By default, this parameter is set to China (Hangzhou). You can configure this parameter based on the location of your source database to reduce the response time (RT) of the database. VPC The VPC in which you want to deploy the destination database. DB InstanceClass The specification of the destination instance. 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 specification of the destination instance is 4 cores and 16 GB memory. For more information about instance specifications and prices, visit the buy page of ApsaraDB RDS instances. Storage Space (GB) The storage space of the destination instance. The default storage space is 500 GB. You can set this parameter based on your business requirements.
- In the Available section, select the destination instance and click the right arrow to add the destination instance to the Selected section on the right. Then, click Precheck.
- After the restoration task is created, click Restore Tasks in the left-side navigation pane. On the page that appears, view the task ID and the progress of the restoration task.
- After the restoration task is complete, log on to the ApsaraDB RDS console to view information about the destination ApsaraDB RDS for SQL Server instance.
Supported locations for the destination database
DBS allows you to restore an SQL Server database to an ApsaraDB RDS for SQL Server database, a self-managed SQL Server database that is deployed in a data center, or a self-managed SQL Server database that is hosted on an Elastic Compute Service (ECS) instance. We recommend that you restore data to an ApsaraDB RDS for SQL Server database. This way, the restoration can be performed at a higher rate and in a more easy and secure manner. The following table describes the differences when you restore data to databases that are deployed in different locations.
|An ApsaraDB RDS for SQL Server database||
|A self-managed database on an ECS instance||
|A self-managed database in a data center||