This topic describes how to restore the data of an ApsaraDB RDS for SQL Server instance by using a data backup.

You can use one of the following methods to restore the data of an RDS instance:

Restore data to an existing RDS instance

You can restore the data of an RDS instance by backup set or time to the same RDS instance or another existing RDS instance. You can restore all or some of the databases on your RDS instance.

This function is available to RDS instances that run SQL Server 2008 R2 with standard or enhanced SSDs, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017 SE, or SQL Server 2019 SE.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region of the RDS instance to which the backup set belongs.Select a region
  3. Find the RDS instance and click its ID.
  4. In the left-side navigation pane, select Backup and Restoration.
  5. In the upper-right corner of the page, click Restore.
  6. In the dialog box that appears, select Restore to Existing Instance and click OK.
  7. Configure parameters and click OK.
    Note
    • If two databases have the same name, you must select New Name and modify the database names.
    • A new database name can contain lowercase letters, digits, underscores (_), and hyphens (-).
    Parameter Description
    Restore Method
    • By Time: You can restore data to any point in time within the log backup retention period. 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: You can specify a full or incremental backup set from which you want to restore data to the specified RDS instance.
    Time Select the point in time to which you want to restore data. This parameter is displayed when the Restore Method parameter is set to By Time.
    Backup Set Select the backup set from which you want to restore data. This parameter is displayed when the Restore Method parameter is set to By Backup Set.
    Instance Select the RDS instance to which you want to restore data.

    By default, RDS instances (including the original RDS instance) that are created by the same Alibaba Cloud account, located in the same region, and use the same database engine version as the original RDS instance are displayed.

    Note If a large number of RDS instances are displayed, you can enter a keyword in the search box to find the RDS instance you want.
    Databases to Restore
    1. Select the databases that you want to restore. By default, all databases of the original RDS instance are displayed and selected.
      • If you want to restore the data of the entire RDS instance, make sure that all databases are selected.
      • If you want to restore one or more databases, make sure that these databases are selected.
    2. Specify the names of the restored databases. By default, the original database names are used.
      Note The names of the restored databases cannot be the same as those of the existing databases in the destination RDS instance.

Restore data to a new RDS instance

You can restore the data of an RDS instance to a new RDS instance by backup set or time. If you choose to restore data by backup set, you can restore some or all databases from the selected backup set.

You must pay for the new RDS instance. If the original RDS instance is no longer needed after restoration, we recommend that you release or unsubscribe from it. For more information, see Release an RDS SQL Server instance.

This function is available to RDS instances that run SQL Server 2008 R2 with standard or enhanced SSDs, SQL Server 2012, SQL Server 2014, SQL Server 2016, or SQL Server 2017.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the original RDS instance resides.Select a region
  3. Find the original RDS instance and click its ID.
  4. In the left-side navigation pane, select Backup and Restoration.
  5. In the upper-right corner of the page, click Restore.
  6. In the dialog box that appears, select Restore to New Instance and click OK.
  7. On the Restore Database (Previously Clone Instance) page, configure the following parameters.
    Parameter Description
    Billing Method
    • Subscription: You must pay the subscription fee when you create an RDS instance. We recommend that you select subscription billing for long-term use because it is more cost-effective than pay-as-you-go billing. A subscription-billed instance is an instance that you subscribe to for a period of time and pay for up front.
    • Pay-As-You-Go: A pay-as-you-go-billed instance is charged per hour based on your actual resource usage. We recommend that you select pay-as-you-go billing for short-term use. You can release your pay-as-you-go instance to reduce costs when you no longer need it.
    Restore Mode
    • By Time: You can restore data to any point in time within the log backup retention period. For more information about how to view or change the log backup retention period, see Back up an ApsaraDB RDS for PostgreSQL instance.
    • By Backup Set
    Note
    • By Time is displayed only when the log backup function is enabled.
    • You can choose to restore some or all databases.
    Database You can choose to restore some or all databases. If you select Part, you must manually enter the names of the databases that you want to restore. Separate multiple database names with commas (,).
    Edition
    • Basic: The database system consists of only one instance. Computing is separated from storage to increase cost-effectiveness.
    • High-availability: The database system consists of one primary instance and one secondary instance. These instances work in the classic high availability architecture.
    • Cluster: The database system consists of one primary instance, one secondary instance, and up to seven read-only instances that are created to scale out the read capability.
    Note The RDS editions available vary based on the region and database engine version you select. For more information, see ApsaraDB for RDS edition overview.
    Zone

    The zone where the new RDS instance resides. Each zone is an independent physical location within a region. Zones in the same region provide the same services. Multi-zone deployment provides zone-disaster recovery for your business.

    You only need to select a primary zone. The system automatically assigns a secondary zone to the new RDS instance.

    Instance Type
    • Entry-level: belongs to the general-purpose instance family. A general-purpose instance exclusively occupies the memory and I/O resources allocated to it, but shares CPU and storage resources with other general-purpose instances that are deployed on the same server.
    • Enterprise-level: belongs to the dedicated or dedicated host instance family. A dedicated instance exclusively occupies the CPU, memory, storage, and I/O resources allocated to it. The top configuration of the dedicated instance family is the dedicated host. A dedicated host instance occupies all of the CPU, memory, storage, and I/O resources on the server where it resides.
    Note Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum input/output operations per second (IOPS). For more information, see Primary instance types.
    Capacity The storage capacity that the new RDS instance has available to store data files, system files, binary log files, and transaction files. The storage capacity increases in increments of 5 GB.
    Note The dedicated instance family supports exclusive allocations of resources. Therefore, the storage capacity of each instance type with local SSDs in this family is fixed. For more information, see Primary instance types.
  8. Click Next:Instance Configuration.
  9. Configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: a traditional type of network.
    • VPC: A Virtual Private Cloud (VPC) is an isolated network with higher security and better performance than the classic network. If you select the VPC network type, you must also specify the VPC and the VSwitch of Primary Node parameters.
    Note The new RDS instance and the ECS instance to which you want to connect must have the same network type. If both their network types are VPC, make sure that they reside in the same VPC. Otherwise, they cannot communicate over an internal network.
    Resource Group The resource group to which the new RDS instance belongs.
  10. Click Next: Confirm Order.
  11. Confirm the settings in the Parameters section, specify Purchase Plan and Duration, read and select Terms of Service, and click Pay Now. You only need to specify Duration when you create a subscription instance.

Restore data to the original RDS instance by using a temporary RDS instance

This function is available to the following SQL Server versions and editions:
  • SQL Server 2012 EE Basic
  • SQL Server 2012 Web
  • SQL Server 2016 Web
  • SQL Server 2008 R2 with an enhanced or standard SSD

For more information, see Restore data of ApsaraDB RDS for SQL Server instances by using temporary instances.

Related operations

Operation Description
RecoveryDBInstance Restores one or more databases of an ApsaraDB for RDS instance.