You can use Database Backup (DBS) to automatically back up SQL Server databases to Alibaba Cloud and 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 to Object Storage Service (OSS) by using a backup
schedule in which the Backup Storage Type parameter is set to OSS For User. For more information, see Back up an SQL Server database.
Note 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 in which the destination database
Note For information about how to create a VPC, see Default VPCs and default vSwitches.
|Disaster recovery in the cloud||DBS allows you to restore data that is backed up at any point in time to an ApsaraDB RDS instance to implement disaster recovery or restore databases after accidental operations.|
|Data archiving to the cloud||DBS allows you to dump historical data to an ApsaraDB RDS instance. This way, you can resolve issues that may be caused due to insufficient space of your on-premises storage devices.|
|Data warehouse planning||After you restore data to a database instance, you can perform specific offline queries and slow queries in the database instance. This prevents impacts on your online business.|
|Financial inventory||DBS allows you to restore a database to a specific point in time so that you can perform statistical analysis based on business data of that point in time.|
After you use DBS to restore data to an ApsaraDB RDS instance for emergency disaster recovery, the ApsaraDB RDS instance can be retained for a long period of time. You can also release the ApsaraDB RDS instance 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, set the parameters and click Next. The following table describes the parameters.
Section Parameter Description N/A Task Name The name of the restore 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 displayed next to 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 parameter 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 pay-as-you-go.
Database Location The location of the destination database. In this example, the parameter is set to RDS Instance. For more information, see Supported locations for the destination database. Instance Region The region in which you want to deploy the destination database. By default, this parameter is set to China (Hangzhou). You can set 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 specifications 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 specifications 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 restore task is created, click Restore Tasks in the left-side navigation pane. On the page that appears, view the ID and progress of the restore task.
- After the restore task is complete, log on to the ApsaraDB RDS console to view information about the ApsaraDB RDS for SQL Server instance created.
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 speed and in an easier and more 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||