All Products
Search
Document Center

ApsaraDB RDS:Restore the data of an ApsaraDB RDS for SQL Server instance by using a temporary RDS instance

Last Updated:May 09, 2025

The data restoration feature minimizes the losses that are caused by unexpected operations. You can create a temporary ApsaraDB RDS for SQL Server instance to restore the data of a primary RDS instance. A temporary RDS instance serves as an independent environment for data access and does not affect existing RDS instances. You can restore data to the temporary RDS instance, verify that the restored data is correct, and then migrate the restored data to the primary RDS instance. This minimizes the impact of data restoration on your workloads.

Note

For more information about how to select a data restoration method, see Methods to restore an ApsaraDB RDS for SQL Server instance.

Prerequisites

  • The RDS instance runs SQL Server 2008 R2 on RDS High-availability Edition and uses Premium Local SSDs.

  • The primary RDS instance has data backup files. If you want to restore data to a point in time, log backup files are required. For more information, see Back up an ApsaraDB RDS for SQL Server instance.

Usage notes

  • The temporary RDS instance inherits the account and password settings of the primary RDS instance.

  • The temporary RDS instance uses the classic network type.

  • Only one temporary instance can be created at a time. If you want to create another temporary RDS instance, you must delete the existing temporary RDS instance.

  • You are not charged for temporary RDS instances, including temporary RDS instances of higher versions. After a temporary RDS instance is created, it is retained for two days and is automatically released two days later. After a temporary RDS instance of a later version is created, it is retained for seven days and is automatically released seven days later.

Limits

  • You cannot create, modify, or delete databases or accounts on a temporary RDS instance.

  • You cannot apply public endpoints for temporary RDS instances. For more information, see Apply for or release a public endpoint. If you must use the public endpoint for a temporary RDS instance, submit a ticket.

Procedure

  1. 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.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Temporary Instance tab.

  4. Select the period that is the closest to the point in time to which you want to restore data. The system restores data based on the last backup before the point in time.

    • Select Time: The system displays the points in time at which valid backup sets on the Data Backup tab are generated.

    • Other Times: You can select another point in time at which a valid backup set is generated.

  5. Select a creation type.

    • Click Create Temporary Instance. Then, click OK.

    • Click Create Temporary Instance of Higher Version. In the dialog box that appears, configure the Zone, Upgrade To, VPC, and VSwitch parameters, and click OK.

    Note
    • The system uses the default settings for the instance type and storage type for a temporary RDS instance of a later version. You cannot modify the settings.

    • The time that is required to create a temporary RDS instance varies based on factors such as the data volume. You can view the task progress on the Tasks page.

    • Only one temporary RDS instance can exist at a time. If you want to roll back to another temporary RDS instance, you must delete the current temporary RDS instance.

  6. After the temporary RDS instance is created, go to the Instances page and click the ID of the primary RDS instance.

  7. In the upper-right corner of the page that appears, click Database Migration to go to the Data Synchronization page of the new Data Transmission Service (DTS) console.

  8. In the upper-left corner of the page, select the region in which the data migration instance resides.

  9. Click Create Task. In the Create Data Synchronization Task wizard, configure the source and destination databases. The following table describes the parameters.

    Warning

    After you configure the source and destination databases, we recommend that you read the Limits that are displayed in the upper part of the page. Otherwise, the task may fail or data inconsistency may occur.

    源目库信息

    Section

    Parameter

    Description

    N/A

    Task Name

    The name of the DTS task. DTS automatically generates a task name. We recommend that you specify an informative name that makes it easy to identify the task. You do not need to specify a unique task name.

    Source Database

    Database Type

    The type of the database. Select SQL Server.

    Access Method

    The access method. Select Public IP Address.

    Note

    If you select a self-managed database, you must make preparations. For more information, see Preparation overview.

    Instance Region

    The region in which the self-managed SQL Server database resides.

    Hostname or IP address

    The endpoint of the self-managed SQL Server database. In this example, enter the public IP address.

    Port Number

    The port number of the self-managed SQL Server database. The default port number is 1433.

    Database Account

    The account that is used to log on to the self-managed SQL Server database.

    Database Password

    The password that is used to access the database instance.

    Destination Database

    Database Type

    The type of the database. Select SQL Server.

    Access Method

    The access method. Select Alibaba Cloud Instance.

    Instance Region

    The region in which the destination RDS instance resides.

    Instance ID

    The ID of the destination RDS instance.

    Database Account

    The database account of the destination RDS instance.

    Database Password

    The password that is used to access the database instance.

  10. In the lower part of the page, click Test Connectivity and Proceed.

    If the source or destination database is an Alibaba Cloud database instance, such as an ApsaraDB 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 Elastic Compute Service (ECS) instance, DTS automatically adds the CIDR blocks of DTS servers to the security group rules of the ECS instance, and you must make sure that the ECS instance can access the database. 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 a 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 DTS to access the database. For more information, see the CIDR blocks of DTS servers section of the Add the CIDR blocks of DTS servers topic.

    Warning

    If the public CIDR blocks of DTS servers are automatically or manually added to the whitelist of a database instance or to the security group rules of an ECS instance, security risks may arise. Therefore, before you use DTS to migrate data, you must understand and acknowledge the potential risks and take preventive measures, including but not limited to the following measures: enhancing the security of your username and password, limiting the ports that are exposed, authenticating API calls, regularly checking the whitelist or security group rules and forbidding unauthorized CIDR blocks, or connecting the database instance to DTS by using Express Connect, VPN Gateway, or Smart Access Gateway.

  11. Configure task objects and perform advanced configurations. For more information, see Step 5.

  12. In the lower part of the page, click Next: Save Task Settings and Precheck.

    You can move the pointer over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters to view the parameters to be specified when you call the relevant API operation to configure the DTS task.

    Note
    • Before you can start the data migration task, DTS performs a precheck. You can start the data migration task only after the task passes the precheck.

    • If the task fails to pass the precheck, click View Details next to each failed item. After you analyze the causes based on the check results, troubleshoot the issues. Then, run a precheck again.

    • If an alert is triggered for an item during the precheck:

      • If an alert item cannot be ignored, click View Details next to the failed item and troubleshoot the issues. Then, run a precheck again.

      • If the alert item can be ignored, click Confirm Alert Details. In the View Details dialog box, click Ignore. In the message that appears, click OK. Then, click Precheck Again to run a precheck again. If you ignore the alert item, data inconsistency may occur, and your business may be exposed to potential risks.

  13. Wait until Success Rate becomes 100%. Then, click Next: Purchase Instance.

  14. On the Purchase Instance page, configure the Instance Class parameter for the data migration instance. The following table describes the parameters.

    Section

    Parameter

    Description

    New Instance Class

    Resource Group

    The resource group to which the data migration instance belongs. Default value: default resource group. For more information, see What is Resource Management?

    Instance Class

    DTS provides instance classes that vary in the migration speed. You can select an instance class based on your business scenario. For more information, see Instance classes of data migration instances.

  15. Read and agree to Data Transmission Service (Pay-as-you-go) Service Terms by selecting the check box.

  16. Click Buy and Start. In the message that appears, click OK.

    You can view the progress of the task on the Data Migration page.

    Note
    • If a data migration task cannot be used to migrate incremental data, the task automatically stops. The Completed is displayed in the Status section.

    • If a data migration task can be used to migrate incremental data, the task does not automatically stop. The incremental data migration task never stops or completes. The Running is displayed in the Status section.

References

  • For more information about how to call an API operation to create a temporary RDS instance for an RDS instance that runs SQL Server 2008 R2 and uses Premium Local SSDs, see CreateTempDBInstance.

  • For more information about how to use Data Management (DMS) or the SQL Server Management Studio (SSMS) client on the Elastic Compute Service (ECS) instance to access a temporary RDS instance over an internal network, see Log on to a temporary RDS instance.