The topic describes how to restore the data of an ApsaraDB RDS for PostgreSQL instance to a new RDS instance.

Prerequisites

The original RDS instance whose data you want to restore must meet the following requirements:

  • The original RDS instance is in the Running state and is not locked.
  • The original RDS instance does not have ongoing migration tasks.
  • If you want to restore data to a point in time, the log backup feature is enabled for the original RDS instance.
    Note RDS instances that run the Basic Edition do not support the log backup feature. Therefore, you cannot restore data of such an RDS instance to a point in time.
  • If you want to restore data from a backup set, the original RDS instance has at least one backup set.

Background information

ApsaraDB RDS for PostgreSQL allows you to restore data from a backup set or to a point in time. The following procedure is used to restore data:

  1. Restore data to a new RDS instance. This process was formerly known as instance cloning.
  2. Log on to the new RDS instance and verify the data.
  3. Migrate the data to the original RDS instance.

Precautions

  • The new RDS instance and the original RDS instance must have the same IP address whitelist, backup, and parameter settings.
  • The data and account information of the new RDS instance must be the same as the data and account information that is indicated by the specified data or log backup file of the original RDS instance.

Billing

The restoration fee is the same as the fee that is required to purchase a new RDS instance.For more information, visit the ApsaraDB RDS buy page.

Restore data to a new RDS instance

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. In the upper-right corner of the page, click Restore Database (Previously Clone Database).
  4. Configure the following parameters.
    Parameter Description
    Billing Method
    • Subscription: A subscription instance is an instance that you can subscribe to for a specified period and pay for up front. Subscription billing is more cost-effective than pay-as-you-go billing. Therefore, we recommend that you select subscription billing with a longer commitment. You can receive larger discounts for longer subscription periods.
    • Pay-As-You-Go: A pay-as-you-go 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. If you no longer need your pay-as-you-go instance, you can release it to reduce costs.
    Restore Mode
    • By Time: allows you to restore data to a point in time within the specified 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: allows you to restore data from a specified backup set.
    Note The By Time option appears only when the log backup feature is enabled.
    Edition
    • Basic: The database system consists of only one RDS instance. Computing is separated from storage to increase cost-effectiveness.
    • High-availability: The database system adopts the classic high-availability architecture that consists of one primary instance and one secondary instance.
    Note The available RDS editions vary based on the selected region and database engine version. For more information, see Overview of ApsaraDB RDS editions
    Zone of Primary Node and Zone of Secondary Node

    The zone where the RDS instance resides. Each zone is an independent physical location within a region. For example, the China (Hangzhou) region contains Zone H, Zone I, and Zone J. ApsaraDB RDS supports the following two deployment methods:

    • Multi-zone Deployment: The primary RDS instance and the secondary RDS instance reside in different zones to provide zone-disaster recovery. This is the recommended deployment method.
    • Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.
    Note If you select the RDS Basic Edition, you can select only the Single-zone Deployment method.
    Instance Type
    • Entry-level: belongs to the general-purpose instance family. A general-purpose instance exclusively occupies the allocated memory and I/O resources. However, it shares CPU and storage resources with the other general-purpose instances that are deployed on the same server.
    • Dedicated Instance (Enterprise-level): belongs to the dedicated instance family or the dedicated host instance family. A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. The top configuration of the dedicated instance family is the dedicated host instance family. A dedicated host instance exclusively occupies all of the CPU, memory, storage, and I/O resources on the server where it is deployed.
    • Dedicated: A dedicated cluster exclusively occupies all the resources on a VM or physical host. The permissions to manage hosts in a dedicated cluster can be authorized to you. This allows you to create multiple database instances on a host. For more information, see Add hosts
    Note Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary instance types
    Capacity The storage capacity that the read-only 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
  5. Click Next: Instance Configuration.
  6. Configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: the traditional type of network.
    • VPC: the recommended type of network. A virtual private cloud (VPC) is an isolated virtual network that provides higher security and better performance than the classic network. If you select the VPC network type, you must also specify the VPC parameter and the vSwitch of Primary Node parameter. If you select the Multi-zone Deployment method in the Basic Configurations step, you must specify both the VSwitch of Primary Node and VSwitch of Secondary Node parameters.
    Note The RDS instance must have the same network type as the ECS instance that you want to connect. If the RDS and ECS instances both have the VPC network type, these instances must also reside in the same VPC. Otherwise, these instances cannot communicate over an internal network.
    Resource Group The resource group to which the new RDS instance belongs.
  7. Click Next: Confirm Order.
  8. Confirm the settings in the Parameters section, specify the Purchase Plan and Duration parameters, read and select Terms of Service, and then click Pay Now. You must specify the Duration parameter only when the new RDS instance uses the subscription billing method.

Log on to the new RDS instance and verify the data

For more information, see Connect to an ApsaraDB RDS for PostgreSQL instance.

Migrate data to the original RDS instance

After you verify the data on the new RDS instance, you can migrate the data from the new RDS instance back to the original RDS instance. For more information, see Migrate data between RDS instances.
Note The migration does not interrupt the workloads on the original RDS instance.