This topic describes how to restore data from an ApsaraDB MyBase for SQL Server instance to another instance. If you restore data to the original instance, data loss may occur.

Prerequisites

The data in your instance is backed up. For information about how to back up data, see Back up an ApsaraDB RDS for SQL Server instance.

Restore data

You can use one of the following methods to restore the data of an ApsaraDB MyBase for SQL Server instance:

Restore data to an existing instance

You can restore data to an existing instance, including the original instance. You can restore data from a backup set or to a specific point in time. If you restore data from a backup set, you can restore data of specific databases or all databases in the instance.

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select the region where you want to create a dedicated cluster.
  3. In the left-side navigation pane, choose Instances > SQL Server. Then, you can use one of the following methods to restore data:
    • Find the instance whose data you want to restore, click More in the Actions column, and then click Restore Database. Restore data
    • Find the instance whose data you want to restore and click Details in the Actions column. On the page that appears, click Backup and Restoration in the left-side navigation pane. Then, on the page that is displayed, click Restore Database. Restore data from a backup
  4. In the dialog box that appears, select Restore to Existing Instance and click OK.
  5. Configure the following parameters and click OK.
    Parameter Description
    Restore Method
    • By Time: allows you to restore data to a point in time within the specified log retention period. The time is accurate to the second. For more information about how to view or change the log backup retention period, see Back up an ApsaraDB RDS for SQL Server instance.
    • By Backup Set: allows you to restore the data from a full or incremental data backup file.
    Restore Time This parameter appears only when you set the Restore Method parameter to By Time. Select the point in time to which you want to restore the data.
    Backup Set This parameter appears only when you set the Restore Method parameter to By Backup Set. Select the data backup file from which you want to restore the data.
    More Backup Sets This parameter displays the latest 1,000 data backup files. If you cannot find the required data backup file from the Backup Set drop-down list, you can select this check box. Then, ApsaraDB RDS displays more data backup files for you to search.
    Destination Instance Name Select the destination RDS instance to which you want to restore the data.

    By default, ApsaraDB RDS displays all the RDS instances that are created within your Alibaba Cloud account and reside in the selected region. These displayed RDS instances include the original RDS instance whose data you want to restore.

    Note
    • If you use a snapshot backup file, you can restore the data only to an RDS instance on which the snapshot backup feature is enabled. For more information, see Snapshot backup.
    • The destination RDS instance can run a higher SQL Server version than the original RDS instance.
    • If the original RDS instance belongs to the shared instance family, you cannot restore the data of the instance to a general-purpose or dedicated RDS instance. Similarly, if the original RDS instance belongs to the general-purpose or dedicated instance family, you cannot restore the data of the instance to a shared RDS instance.
    • If ApsaraDB RDS displays a large number of RDS instances, you can enter a keyword in the Destination Instance Name field to search for the required destination RDS instance.
    Databases to Restore
    1. Select the databases that you want to restore. By default, ApsaraDB RDS displays and selects all the databases that are created on the original RDS instance.
      • If you want to restore all the data of the original RDS instance, select all the databases.
      • If you want to restore one or more databases, select only the required databases.
    2. Specify the names that you want to use for the selected databases on the destination RDS instance. By default, the original names of the selected databases are retained.
      Note The names of the selected databases on the original RDS instance cannot be the same as those of the existing databases on the destination RDS instance.
    Note
    • If a selected database on the original RDS instance has the same name as an existing database on the destination RDS instance, you must specify New Database Name for the selected database.
    • The value of New Database Name can contain only lowercase letters, digits, underscores (_), and hyphens (-).

Restore data to a new instance

You can restore data from a data backup set or to a specific point in time. If you restore data from a backup set, you can restore data of specific databases or all databases in the instance.

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select the region where you want to create a dedicated cluster.
  3. In the left-side navigation pane, choose Instances > SQL Server. Then, you can use one of the following methods to restore data:
    • Find the instance whose data you want to restore, click More in the Actions column, and then click Restore Database. Restore data
    • Find the instance whose data you want to restore and click Details in the Actions column. On the page that appears, click Backup and Restoration in the left-side navigation pane. Then, on the page that is displayed, click Restore Database. Restore data from a backup
  4. In the dialog box that appears, select Restore to New Instance and click OK.
  5. In the Restore Database panel, configure the parameters and click OK.
    Parameter Description
    VSwitch The vSwitch to which you want to connect the new instance. If no vSwitches are available, Click Create vSwitch to create a vSwitch.
    Restore Mode
    • By Time: If you select this option, you need to specify a point in time to which you want to restore the data. The specified point in time must be within the log backup retention period that you specify for the instance. For information about how to view or change the log backup retention period, see Back up an ApsaraDB RDS for SQL Server instance.
    • By Backup Set: If you select this option, you need to specify the backup set from which you want to restore the data.
    Note
    • The By Time option is available only when the log backup feature is enabled.
    • You can restore data of specific databases or all databases in the instance.
    Restore Point This parameter becomes available only after you set the Restore Method parameter to By Time. Specify the point in time to which you want to restore the data.
    By Backup Set This parameter becomes available only after you set the Restore Method parameter to By Backup Set. Select the data backup set from which you want to restore the data.
    Instance Type The type of the destination instance.
    Storage Capacity The storage capacity of the destination instance.