This topic describes how to restore the data of a primary ApsaraDB RDS for SQL Server instance by using a temporary RDS instance. The data restoration feature minimizes the losses that are caused by unintentional operations.

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

  • The primary RDS instance runs one of the following SQL Server versions:
    • SQL Server 2012 EE Basic
    • SQL Server 2012 Web
    • SQL Server 2016 Web
    • 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.

Precautions

  • 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 deletes the temporary RDS instance.

Procedure

  1. Log on to the ApsaraDB RDS console.
  2. In the top navigation bar, select the region where the primary RDS instance resides.Select a region
  3. Find the primary RDS instance and click its ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. Click the Temporary Instance tab.
  6. 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. Then, click Create Temporary Instance.
  7. In the message that appears, click OK.
  8. After the temporary RDS instance is created, go to the Instances page.
  9. Click the ID of the primary RDS instance.
  10. In the upper-right corner of the page, click Import Database to go to the Data Transmission Service (DTS) console.
  11. In the left-side navigation pane, click Data Migration.
  12. Click Create Migration Task. On the page that appears, specify Task Name, Source Database, and Destination Database.

    Parameter description:

    • Task Name: DTS automatically generates a name for each task. You can change the default name to an informative one for easy task identification.
    • Source Database
      • Instance Type: Select RDS Instance from the drop-down list.
      • Instance Region: Select a region from the drop-down list. This region is the same as that of the primary RDS instance.
      • RDS Instance ID: Select the ID of the temporary RDS instance from the drop-down list.
      • Database Account: Enter the username of the account that has read and write permissions on the data that you want to migrate. You must specify the same username for the temporary and primary RDS instances.
      • Database Password: Enter the password of the account. You must specify the same password for the temporary and primary RDS instances.
    • Destination Database
      • Instance Type: Select RDS Instance from the drop-down list.
      • Instance Region: Select the region where the primary RDS instance resides from the drop-down list.
      • RDS instance ID: Select the ID of the primary RDS instance from the drop-down list.
      • Database Account: Enter the username of the account that has read and write permissions on the data that you want to migrate.
      • Database Password: Enter the password of the account.
  13. Click Set Whitelist and Next to go to the Configure Migration Types and Objects step.
  14. Specify Migration Type. Select the objects that you want to migrate in the Available section and click the > icon to add the selected objects to the Selected section. To modify the name of an object that you want to migrate in the destination database, move the pointer over the destination database in the Selected section. The Edit button appears.
  15. Click Precheck.
  16. If the precheck fails, perform this step. If the precheck succeeds, go to Step 18.

    If the precheck fails, click the icon next to each Failed check item to view the failure details. After all the errors are fixed, select the current migration task on the Migration Tasks page and perform a precheck again.

    View precheck results
  17. After all the errors are fixed, select the new migration task and click Start on the Migration Tasks page.
  18. After the precheck succeeds, click OK.
  19. In the Confirm Settings dialog box, specify the Channel Specification parameter, select Data Transmission Service (Pay-As-You-Go) Service Terms, and then click Buy and Start to start the migration task.

Related operations

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