The topic describes how to restore data of an ApsaraDB RDS for PostgreSQL instance to a new RDS instance.
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 RDS 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 file, the original RDS instance has at least one backup file.
ApsaraDB RDS for PostgreSQL allows you to restore data from a backup file or to a point in time. The entire restoration process consists of the following steps:
- Restore data to a new RDS instance. This process was formerly known as instance cloning.
- Log on to the new RDS instance and verify the data on the new RDS instance.
- Migrate the data from the new RDS instance to the original RDS instance.
- The new RDS instance and the original RDS instance must have the same 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.
The fee required to renew the subscription of an RDS instance is the same as the fee required to purchase an RDS instance. The price of the RDS instance that you want to purchase varies based on the instance configuration such as the region, instance type, and storage capacity that you select. For more information, visit the ApsaraDB RDS buy page.
Restore data to a new RDS instance
- Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
- In the left-side navigation pane, click Backup and Restoration.
- In the upper-left corner of the page that appears, click Restore Database.
- Configure the following parameters.
Parameter Description Billing method
- Subscription: A subscription RDS instance is an instance for which you pay an upfront fee. For long-term usage, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are charged lower prices for longer subscription periods.
- Pay-As-You-Go: A pay-as-you-go RDS instance is billed per hour based on your actual resource usage. We recommend that you select the pay-as-you-go billing method for short-term use. If you no longer need your pay-as-you-go RDS instance, you can release it to reduce costs.
Note The By Time option is available only after the log backup feature is enabled.
- By Time: allows you to restore data to a point in time within the specified log 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 the data from a data backup file.
Note The available RDS editions vary based on the region and database engine version that you select. For more information, see Overview.
- 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 RDS instance and one secondary RDS instance.
Zone of Primary Node and Zone of Secondary Node A zone is an independent physical location within a region. The Zone of Primary Node parameter specifies the zone to which the primary RDS instance belongs. The Zone of Secondary Node parameter specifies the zone to which the secondary RDS instance belongs.You can select the Single-zone Deployment or Multi-zone Development method.
- Single-zone Deployment: If you select this deployment method, the values of the Zone of Primary Node and Zone of Secondary Node parameters are the same.
- Multi-zone Development: If you select this deployment method, the values of the Zone of Primary Node and Zone of Secondary Node parameters are different. We recommend that you select this deployment method to perform zone-disaster recovery. You must configure the Zone of Primary Node and Zone of Secondary Node parameters.
- After the new RDS instance is created, you can view information about the new RDS instance and its secondary RDS instance on the Service Availability page.
- If you select RDS Basic Edition, the database system consists of only one primary RDS instance and supports only the single-zone deployment method.
Note Each instance type supports a specific number of cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary ApsaraDB RDS instance types.
- General-purpose (Entry-level): A general-purpose instance exclusively occupies the memory and I/O resources that are allocated. However, this type of instance shares CPU and storage resources with other general-purpose instances that are deployed on the same host.
- Dedicated (Enterprise-level): You can select a dedicated instance type or a dedicated host instance type. A dedicated RDS instance exclusively occupies the CPU, memory, storage, and I/O resources that are allocated. The dedicated host instance family is the highest specifications of the dedicated instance family. A dedicated host instance occupies all the CPU, memory, storage, and I/O resources on the host on which the instance is deployed.
- Dedicated Cluster: A dedicated cluster exclusively occupies all the resources on a VM or physical host. The permissions to manage the hosts in a dedicated cluster can be granted to you. This allows you to create multiple database instances on a host. For more information, see Create a host.
Capacity The maximum storage capacity that is provisioned to store data files, system files, binary log files, and transaction files in the new RDS instance. You can change the storage capacity at a step size of 5 GB.Note A dedicated RDS instance that uses local SSDs exclusively occupies the allocated resources, and its storage capacity varies based on the instance type. For more information, see Primary ApsaraDB RDS instance types.
- Click Next: Instance Configuration.
- Configure the following parameters.
Parameter Description Network Type
Note The network type of the RDS instance must be the same as the network type of the Elastic Compute Service (ECS) instance that you want to connect. If the RDS instance and the ECS instance reside in VPCs, both instances must reside in the same VPC. If the RDS instance and the ECS instance reside in different VPCs, these instances cannot communicate over an internal network.
- 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 higher performance than the classic network. If you select the VPC network type, you must configure the VPC and VSwitch of Primary Node parameters. If you set the Deployment Method parameter to Multi-zone deployment in the Basic Configurations step, you must also configure the VSwitch of Secondary Node parameter.
Resource Group The resource group to which the read-only RDS instance belongs.
- Click Next: Confirm Order.
- Confirm the settings in the Parameters section, specify the Purchase Plan and Duration parameters, read and select Terms of Service, click Pay Now, and then complete the payment. 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.