You can restore SQL Server data by creating a temporary instance. This creates an isolated environment for data access without affecting your existing primary instance. You can restore data to the temporary instance, verify its integrity, and then migrate it back to the primary instance. This approach minimizes business disruption during the restoration process.
For more information about how to select a data restoration solution, see Overview of data restoration solutions.
Prerequisites
This feature is available only for RDS for SQL Server 2008 R2 instances of the High-availability Edition with local SSDs.
The instance must have existing data backups. Log backups are required if you want to perform a point-in-time recovery. For more information, see Configure automatic or manual backups.
Usage notes
The temporary instance inherits the database accounts and passwords from the backup file.
The temporary instance is created in the classic network.
You can only have one temporary instance at a time. To create a new one, you must first delete the existing temporary instance.
Temporary instances are free of charge. A temporary instance is retained for two days, and a higher-version instance is retained for seven days before automatic release.
Limitations
You cannot add, modify, or delete databases or accounts on a temporary instance.
You cannot request a public endpoint for a temporary instance. If you must use a public endpoint for the temporary instance, submit a ticket.
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 navigation pane on the left, click Backup and Restoration.
On the Backup and Restoration page, click the Temporary Instance tab.
Select a time closest to your target time. This restores the instance from the last backup before the selected time.
Select Time: The time points displayed on the page correspond to the valid backup sets available on the Data Backup tab.
Other Times: You can also select another time point that has a valid backup set.
Select the type of temporary instance to create.
Click Create Temporary Instance and then click OK.
Click Create Temporary Instance of Higher Version. In the dialog box that appears, select a Create Temporary Instance of Higher Version, an Create Temporary Instance of Higher Version version, a Create Temporary Instance of Higher Version, and a Create Temporary Instance of Higher Version, and then click OK.
NoteThe instance type and storage type for a higher-version temporary instance are set by default and cannot be modified.
The time required to create a temporary instance varies with factors like data volume. You can go to the Tasks page to view the task progress.
Only one temporary instance can exist at a time. If you need to restore to a different point in time by using another temporary instance, you must first delete the current one.
After the temporary instance is created, return to the Instances page and click the ID of the primary instance.
In the upper-right corner of the page, click Database Migration to go to the DTS Migration Task List page in the new Data Transmission Service (DTS) console.
-
In the upper-left corner of the page, select the region where the migration instance is located.
Click Create Task, and then configure the source and destination databases.
WarningAfter you select the source and destination instances, we recommend that you carefully read the limits displayed at the top of the page. Otherwise, the task may fail or data inconsistency may occur.
Category
Parameter
Description
N/A
Task Name
DTS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not need to be unique.
Source database information
Database Type
Select SQL Server.
Connection Type
Select Self-managed database with public IP.
NoteIf you select a self-managed database, you must also complete preparatory tasks. For more information, see Overview of preparations.
Instance Region
Select the region where the source self-managed SQL Server database is located.
Hostname or IP address
Enter the endpoint of the source self-managed SQL Server database. In this example, enter the public endpoint.
Port
Enter the service port of the self-managed SQL Server database. The default is 1433.
Database Account
Enter the database account of the self-managed SQL Server database.
Database Password
Enter the password for the database account.
Destination database information
Database Type
Select SQL Server.
Connection Type
Select Alibaba Cloud instance.
Instance Region
Select the region where the destination RDS for SQL Server instance is located.
Instance ID
Select the instance ID of the destination RDS for SQL Server instance.
Database Account
Enter the database account of the destination RDS for SQL Server instance.
Database Password
Enter the password for the database account.
-
After you complete the configuration, click Test Connectivity and Proceed at the bottom of the page.
If the source or destination database is an Alibaba Cloud database instance, such as an RDS for MySQL or ApsaraDB for MongoDB instance, DTS automatically adds the CIDR blocks of DTS servers to the IP address whitelist of the instance. If the source or destination database is a self-managed database hosted on an ECS instance, DTS automatically adds the CIDR blocks of DTS servers to the security group rules of the ECS instance. You must also ensure that the database is accessible from the ECS instance. If the self-managed database is hosted on multiple ECS instances, you must manually add the CIDR blocks of DTS servers to the security group rules of each ECS instance. If the source or destination database is a self-managed database that is deployed in an on-premises data center or provided by a third-party cloud service provider, you must manually add the CIDR blocks of DTS servers to the IP address whitelist of the database to allow access from DTS servers. For more information about the IP addresses of DTS servers, see CIDR blocks of DTS servers.
WarningAdding the public IP address blocks of DTS servers, whether automatically or manually, may introduce security risks. Using this product, you acknowledge and accept these potential risks. You must implement basic security measures, such as using strong passwords, limiting open ports for each CIDR block, using authentication for internal API calls, and regularly checking and restricting unnecessary CIDR blocks. You can also connect using an internal network, such as a leased line, VPN Gateway, or Smart Access Gateway.
Configure the task objects and advanced settings. For more information, see Step 5.
-
After you complete the configurations, click Next: Save Task Settings and Precheck at the bottom of the page.
You can move the pointer over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters in the bubble that appears to view the parameters for configuring this instance when you call the API operation.
Note-
Before the migration task starts, DTS performs a precheck. The task starts only after it passes the precheck.
-
If the precheck fails, click View Details next to the failed check item, fix the issue based on the prompt, and then run the precheck again.
-
If a warning is reported during the precheck:
-
For check items that cannot be ignored, click View Details next to the failed item, fix the issue based on the prompt, and then run the precheck again.
-
For check items that can be ignored, you can click Confirm Alert Details, Ignore, OK, and Precheck Again to skip the alert item and run the precheck again. If you choose to ignore a warning, it may cause issues such as data inconsistency and pose risks to your business.
-
-
-
When the Success Rate is 100%, click Next: Purchase Instance.
-
On the Purchase page, select the link specification for the data migration instance. For more information, see the following table.
Category
Parameter
Description
New Instance Class
Resource Group Settings
Select the resource group to which the instance belongs. The default value is default resource group. For more information, see What is Resource Management?
Instance Class
DTS provides migration specifications with different performance levels. The link specification affects the migration speed. You can select a specification based on your business scenario. For more information, see Data migration link specifications.
-
After the configuration is complete, read and select Data Transmission Service (Pay-as-you-go) Service Terms.
-
Click Buy and Start. In the OK dialog box that appears, click OK.
You can view the progress of the migration task on the Data Migration Tasks list page.
Note-
If the migration task does not include incremental migration, it stops automatically after the full migration is complete. After the task stops, its Status changes to Completed.
-
If the migration task includes incremental migration, it does not stop automatically. The incremental migration task continues to run. While the incremental migration task is running, the Status of the task is Running.
-
(Optional) After you verify or migrate the data, if you no longer need the temporary instance, delete it as follows:
Go to the details page of the primary instance. In the navigation pane on the left, click Restoration.
On the Temporary Instance tab, click Delete Temporary Instance.
Related topics
To create a temporary instance for an RDS for SQL Server 2008 R2 instance with local SSDs by using an API call, see CreateTempDBInstance.
To access a temporary instance over an internal network, you can use Data Management (DMS) or the SQL Server Management Studio (SSMS) client on an Elastic Compute Service (ECS) instance. For more information, see Log on to a temporary instance.