If a backup file is created for an ApsaraDB RDS for SQL Server instance, you can restore the backup data to an existing RDS instance or a new RDS instance. This is suitable for the analysis of historical data and the restoration of the data on which unintended operations are performed.
Feature description
You can use one of the following methods to restore the data of your RDS instance:
If you want to restore all data of an RDS instance to another RDS instance in the same region, you can refer to this topic. If you want to restore data across regions or restore the backup files of an RDS instance to a self-managed database, you can refer to Methods to restore an ApsaraDB RDS for SQL Server instance.
Restore the data to an existing RDS instance
You can restore the data of your RDS instance to an existing RDS instance, including the original RDS instance, from a data backup file or to a specific point in time. During this process, you can restore some or all of the databases that are created on your RDS instance.
Restoration rules
Item | Description |
Database engine version | The database engine version of the existing RDS instance must be later than or equal to the database engine version of the original RDS instance. |
RDS edition | The RDS edition of the existing RDS instance must be higher than or equal to the RDS edition of the original RDS instance. The following RDS editions are listed in descending order: RDS Cluster Edition, RDS High-availability Edition, and RDS Basic Edition. |
Instance type | The RDS instances can belong to the same instance family or different instance families. The instance families include the general-purpose instance family and the dedicated instance family. |
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Backup and Restoration.
Click Restore.
In the Select Restore Method dialog box, select Restore to Existing Instance and click OK.
NoteThis method is not supported for RDS instances that run SQL Server 2008 R2 with local disks.
Configure the following parameters and click OK.
Parameter
Description
Restore Method
By Backup Set: allows you to restore data from a backup set.
By Time: allows you to restore the data to a point in time within the specified log retention period. For more information about how to view or change the log backup retention period, see Back up an ApsaraDB RDS for SQL Server instance.
Restore Time
This parameter appears only when you set the Restore Method parameter to By Time. Select the point in time to which you want to restore the data.
Backup Set
This parameter appears only when you set the Restore Method parameter to By Backup Set. Select the backup set from which you want to restore the data.
More Backup Sets
This parameter determines whether to display the most recent 1,000 backup sets. If you cannot find the required backup set from the Backup Set drop-down list, select this check box. Then, the system displays more backup sets for you to query.
Destination Instance Name
Select the destination RDS instance to which you want to restore the data. By default, the system displays all the RDS instances that are created within your Alibaba Cloud account and reside in the selected region. The displayed RDS instances include the original RDS instance whose data you want to restore.
NoteIf you use a snapshot backup file, you can restore the data only to an RDS instance on which the snapshot backup feature is enabled. For more information, see Use the snapshot backup feature.
The destination RDS instance can run a higher SQL Server version than the original RDS instance.
If the original RDS instance belongs to the shared instance family, you cannot restore the data of the instance to a general-purpose or dedicated RDS instance. Similarly, if the original RDS instance belongs to the general-purpose or dedicated instance family, you cannot restore the data of the instance to a shared RDS instance.
If a large number of RDS instances are displayed, you can enter a keyword in the Destination Instance Name field to search for the required destination RDS instance.
Databases to Restore
Select the databases that you want to restore. By default, the system displays and selects all the databases that are created on the original RDS instance.
If you want to restore all data of the original RDS instance, select all databases.
If you want to restore specific databases, select only the required databases.
Specify the names that you want to use for the selected databases on the destination RDS instance. By default, the original names of the selected databases are retained. Take note of the following items:
The names of the selected databases on the original RDS instance cannot be the same as those of the existing databases on the destination RDS instance. If selected databases on the original RDS instance have the same names as existing databases on the destination RDS instance, an error is reported for the restoration task. You must change the names that you want to use for the selected databases on the destination RDS instance. If the names of the selected databases on the original RDS instance and the destination RDS instance are different, the existing data of the selected database on the original RDS instance is not overwritten.
The name of the selected database on the destination RDS instance can contain only lowercase letters, digits, underscores (_), and hyphens (-).
Optional. View the progress of the restoration task.
The system generates a restoration task. You can click the icon in the upper-right corner of the page. On the Tasks page, search for the tasks whose Task Type is Clone Instance to view the restoration progress.
Restore data to a new RDS instance
You can restore the data of your RDS instance to a new RDS instance from a backup set or to a specific point in time. If you restore the data from a backup set, you can restore some or all of the databases whose data is included in the backup set. For more information about the time that is required to restore an RDS instance to a new RDS instance, see FAQ.
Billing rules
You are charged for the new RDS instance. You can view the price of the new RDS instance when you create the instance.
If you no longer require the original RDS instance after the restoration, we recommend that you release or unsubscribe from the instance at the earliest opportunity. For more information, see Release or unsubscribe from an ApsaraDB RDS for SQL Server instance.
You are immediately charged for the new RDS instance after the instance is created.
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Backup and Restoration.
Click Restore.
In the Select Restore Method dialog box, select Restore to New Instance and click OK.
NoteThis method is not supported for RDS instances that run SQL Server 2008 R2 with local disks.
On the Restore Instance page, configure the following parameters.
Parameter
Description
Billing Method
Subscription: A subscription instance is an instance for which you pay an upfront fee. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription periods.
Pay-As-You-Go: A pay-as-you-go instance is billed per hour based on your actual resource usage. We recommend that you select the pay-as-you-go billing method for short-term use. If you no longer require a pay-as-you-go RDS instance, you can release it to reduce costs.
NoteIf you select the serverless billing method, you can restore data only to a new serverless RDS instance.
Restoration Mode
By Backup Set: allows you to restore data from a backup set.
By Point in Time: allows you to restore the data to a point in time within the specified log retention period. For more information about how to view or change the log backup retention period, see Back up an ApsaraDB RDS for SQL Server instance.
Database
Specify whether to restore some or all of the databases that are created on the original RDS instance. If you select Some, you must manually enter the names of the databases that you want to restore and separate the database names with commas (,).
NoteIf you enable the snapshot backup feature for the RDS instance, you can select only All. For more information, see Use the snapshot backup feature.
Edition
Basic Edition: In RDS Basic Edition, the database system consists only of an RDS instance, and the computing is separated from storage. This RDS edition is cost-effective and suitable for learning or testing.
High-availability Edition: In RDS High-availability Edition, the database system consists of a primary RDS instance and a secondary RDS instance. These instances work in the high availability architecture. RDS High-availability Edition is suitable for production environments and is suitable for more than 80% of business scenarios.
Cluster Edition: In RDS Cluster Edition, the database system consists of a primary RDS instance, a secondary RDS instance, and up to seven read-only RDS instances. The read capability of the database system improves with the number of read-only RDS instances.
NoteThe available RDS editions vary based on the region and database engine version that you select. For more information, see Overview.
Zone of Primary Node
Select a zone in which the RDS instance resides.
Deployment Method
Multi-zone Deployment: The primary RDS instance and the secondary RDS instance reside in different zones to provide zone-disaster recovery. This is the recommended deployment method.
Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.
NoteNo significant differences exist between the zones in the same region.
If the RDS instance resides in the same zone as the Elastic Compute Service (ECS) instance on which your application is deployed, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance of the RDS instance and the ECS instance is slightly lower than the performance of the RDS instance and the ECS instance that reside in the same zone.
If you set the Edition parameter to Basic Edition, only the Single-zone Deployment method is available.
If Sold Out appears in the upper-right corner of a zone name, this zone does not have sufficient resources. In this case, you must switch to another zone.
Zone of Secondary Node
If you set the Deployment Method parameter to Multi-zone Deployment, you must select the zone in which the secondary RDS instance resides.
Instance Type
General-purpose: entry-level instance type. A shared or general-purpose instance exclusively occupies the memory and I/O resources that are allocated. However, this type of instance shares CPU and storage resources with other general-purpose instances that are deployed on the same host.
Dedicated: enterprise-level instance type. You can select a dedicated instance type or a dedicated host instance type. A dedicated RDS instance exclusively occupies the CPU, memory, storage, and I/O resources that are allocated. The dedicated host instance family is the highest specifications of the dedicated instance family. A dedicated host instance occupies all the CPU, memory, storage, and I/O resources on the host on which the instance is deployed.
Storage Capacity
Configure the storage capacity for your RDS instance. The storage capacity is provisioned to store data files, system files, log files, and transaction files in the RDS instance. You can adjust the storage capacity at a step size of 5 GB.
NoteA dedicated RDS instance that uses local disks exclusively occupies the allocated resources, and its storage capacity varies based on the instance type. For more information, see Primary ApsaraDB RDS instance types.
Click Next: Instance Configuration.
Configure the following parameters.
Parameter
Description
Network Type
Classic Network: the traditional type of network.
VPC: A virtual private cloud (VPC) is an isolated virtual network that provides higher security and higher performance than the classic network. If you set the Network Type parameter to VPC, you must also configure the VPC and vSwitch of Primary Node parameters.
NoteMake sure that the RDS instance and the ECS instance to be connected reside in the same VPC or in the classic network. Otherwise, they cannot communicate over an internal network.
Resource Group
The resource group to which the new RDS instance belongs.
Click Next: Confirm Order.
Confirm the settings in the Parameter Configuration section, configure the Quantity and Subscription Duration parameters, read and select Terms of Service, click Pay Now, and then complete the payment. You must configure the Subscription Duration parameter only when the new RDS instance uses the subscription billing method.
You can go to the Instances page and find the created RDS instance based on the creation time. It requires 1 to 10 minutes to create an RDS instance. You can refresh the page to check whether the RDS instance is created. After the RDS instance is created, you can access the RDS instance to view the restored databases and tables.
Restore the data to the original RDS instance by using a temporary RDS instance
This method is supported only for RDS instances that run SQL Server 2008 R2 and use local disks. For more information, see Restore the data of an ApsaraDB RDS for SQL Server instance by using a temporary RDS instance.
Related operations
You can also restore the data of an RDS instance by calling an API operation. For more information, see RecoveryDBInstance.
If you want to restore all data of an RDS instance, you can refer to this topic. ApsaraDB RDS for SQL Server does not support restoration of individual databases and tables. For more information about data restoration methods, see Methods to restore an ApsaraDB RDS for SQL Server instance.