You can restore data by using temporary instances to minimize losses caused by misoperations on the database.

Creating a temporary instance does not affect the current production instance but will provide a temporary instance for data access. You can restore data to the temporary instance and verify the data before migrating to the primary instance to minimize the impacts of data restoration on services.

Prerequisites

  • The ApsaraDB RDS SQL Server instance must be one of the following editions:
    • ApsaraDB RDS SQL Server 2012 Enterprise Basic Edition
    • ApsaraDB RDS SQL Server 2012/2016 Web Edition
    • ApsaraDB RDS SQL Server 2008 R2
  • The instance has data backup files. If you need to restore by time point, related log backup files are required.

Precautions

  • The temporary instance uses the same account and password as the source instance.
  • The network type of the instance is the classic network.
  • Only one temporary instance can be created at a time. If you need to create a new temporary instance, you must delete the existing temporary instance.
  • The temporary instance is free of charge, but will be automatically released after being created within 48 hours.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the instance is located.Select a region
  3. Find the instance and click the instance ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. Click the Temporary Instance tab.
  6. Select the time period that is closest to the target time point, and the instance will restore data based on the latest backup. Click Create Temporary Instance.
  7. In the message that appears, click OK to create a temporary instance.
  8. After the temporary instance is created, go to the Instances page.
  9. Click the ID of the instance.
  10. In the upper-right corner of the page, click Create Data Migration Task to go to the Data Transmission Service (DTS) console.
  11. Select Data Migration in the left-side navigation pane.
  12. Click Create Migration Task and specify Task Name, Source Database, and Destination Database information.

    Parameter description:

    • 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: The type of the source instance. Select RDS Instance.

      • Instance Region: Select the region where the primary instance is located.

      • RDS Instance ID: Select the ID of the temporary instance from the drop-down list.

      • Database Account: The account of the primary instance. This account must have the read/write permissions on the data to be migrated.

      • Database Password: The password of the primary instance.

    • Destination Database

      • Instance Type: Select RDS Instance.

      • Instance Region: The region where the primary instance is located.

      • RDS instance ID: The ID of the destination RDS instance. Select the ID of the primary instance from the drop-down list.

      • Database Account: The account of the primary instance. This account must have the read and write permissions on the data to be migrated.

      • Database Password: The password of the primary instance.

  13. Click Set Whitelist and Next to go to the Configure Migration Types and Objects wizard.
  14. Select Migration Type. Select the objects to be migrated in the Object to Be Migrated area, and click > to add the selected objects to the Selected area, as shown in the following figure. To modify the name of an object to be migrated in the destination database, move the pointer over the database to be modified in the Selected section. The Edit button is displayed, as shown in the following figure.
  15. Click Precheck and Start.
  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 the check item with check result as Failed to check the failure details, as shown in the following figure. After troubleshooting, select the current migration task on the Migration Tasks page and perform a precheck again.

  17. After all the errors are fixed, on the Migration Tasks page, select the newly created migration task and click Start.
  18. After the precheck succeeds, click OK.
  19. On the Confirm Purchase Configuration page, confirm configuration information and select Service Terms of Data Transmission (Pay-As-You-Go), and click Buy and Start Now.

Related API operations

Operation Description
CreateTempDBInstance Creates temporary instances.