The data restoration feature minimizes the losses that are caused by unintentional operations. You can use a temporary RDS instance to restore the data of a primary ApsaraDB RDS for SQL Server instance. This topic describes how to restore the data of a primary RDS instance by using a temporary RDS instance. After you create a temporary RDS instance for the primary RDS instance, the primary RDS instance still runs as normal. The temporary RDS instance serves only as an intermediary for data restoration. After data is restored to the temporary RDS instance, verify that the restored data is correct. Then, migrate the restored data to the primary RDS instance. This minimizes the impact of data restoration on your workloads.

Prerequisites

  • Your RDS instance runs SQL Server 2008 R2 with 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.

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 RDS instance can be created. If you want to create a temporary RDS instance, you must delete the existing temporary RDS instance.
  • A temporary RDS instance is free of charge. After a temporary RDS instance is created, it remains valid within 48 hours. After 48 hours, ApsaraDB RDS automatically deletes the temporary RDS instance.
  • You cannot create, modify, or delete databases or accounts on a temporary RDS instance.

Procedure

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS 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. ApsaraDB RDS restores data based on the last backup before the point in time.
  5. Click Create Temporary Instance.
  6. In the message that appears, click OK.
  7. After the temporary RDS instance is created, go to the Instances page and click the ID of the primary RDS instance.
  8. In the upper-right corner of the page, click Database Migration to go to the Data Synchronization page of the Data Transmission Service (DTS) console.
  9. In the top navigation bar, select the region where the data migration instance resides.
    Select a region
  10. Click Create Task. On the page that appears, configure the source and destination databases.
    Warning After you select the source and destination instances, we recommend that you read the limits displayed at the top of the page. This helps you create and run the data migration task.
    Configure the source database
    Section Parameter Description
    N/A Task Name

    DTS automatically generates a task name. We recommend that you specify an informative name to identify the task. You do not need to use a unique task name.

    Source Database Database Type Select SQL Server.
    Access Method Select Public IP Address.
    Note If your source database is a self-managed database, you must deploy the network environment for the database. For more information, see Preparation overview.
    Instance Region Select the region in which the self-managed SQL Server database resides.
    Hostname or IP address Enter the endpoint of the self-managed SQL Server database. In this example, enter the public IP address.
    Port Number Enter the port number of the self-managed SQL Server database. The default port number is 1433.
    Database Account Enter the account that is used to log on to the self-managed SQL Server database.
    Database Password

    Enter the password of the database account.

    Destination Database Database Type Select SQL Server.
    Access Method Select Alibaba Cloud Instance.
    Instance Region Select the region in which the destination ApsaraDB RDS for SQL Server instance resides.
    Instance ID Select the ID of the destination ApsaraDB RDS for SQL Server instance.
    Database Account Enter the database account that is used to log on to the destination ApsaraDB RDS for SQL Server instance.
    Database Password

    Enter the password of the database account.

  11. In the lower part of the page, click Test Connectivity and Proceed.
    Warning
    • If the source or destination database instance is an Alibaba Cloud database instance, such as an ApsaraDB RDS for MySQL or ApsaraDB for MongoDB instance, or is a self-managed database hosted on Elastic Compute Service (ECS), DTS automatically adds the CIDR blocks of DTS servers to the whitelist of the database instance or ECS security group rules. For more information, see Add the CIDR blocks of DTS servers to the security settings of on-premises databases. If the source or destination database is a self-managed database on data centers or is from other cloud service providers, you must manually add the CIDR blocks of DTS servers to allow DTS to access the database.
    • If the CIDR blocks of DTS servers are automatically or manually added to the whitelist of the database, Alibaba Cloud database instance, or ECS security group rules, 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 ECS security group rules and forbidding unauthorized CIDR blocks, or connecting the database to DTS by using Express Connect, VPN Gateway, or Smart Access Gateway.
    • After the DTS task is complete or released, we recommend that you manually detect and remove the added CIDR blocks from the whitelist of the database, Alibaba Cloud database instance, or ECS security group rules.
  12. Configure task objects and perform advanced configurations. For more information, see Step 5.
  13. In the lower part of the page, click Next: Save Task Settings and Precheck.
    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, you can click the Info icon icon next to each failed item to view details.
      • You can troubleshoot the issues based on the causes and run a precheck again.
      • If you do not need to troubleshoot the issues, you can ignore failed items and run a precheck again.
  14. Wait until the Success Rate becomes 100%. Then, click Next: Purchase Instance.
  15. On the Purchase Instance page, specify the Instance Class parameter for the data migration instance. The following table describes the parameter.
    Section Parameter Description
    Parameters Instance Class

    DTS provides several instance classes that have different performance in migration speed. You can select an instance class based on your business scenario. For more information, see Specifications of data migration instances.

  16. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.
  17. Click Buy and Start to start the data migration task. You can view the progress of the task in the task list.

Related operations

Operation Description
Create a temporary instance Creates a temporary RDS instance.