The topic describes how to restore data of an ApsaraDB RDS for PostgreSQL instance.
ApsaraDB RDS for PostgreSQL allows you to restore data from a backup set 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.
For more information about how to select a data restoration method, see Overview of data restoration methods.
The original RDS instance whose data you want to restore must meet the following requirements:
The original RDS instance is in the Running state.
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. For more information about how to enable the log backup feature, see Configure automatic backups.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.
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 for the data restoration is the same as the price of a new RDS instance. The price of a new RDS instance varies based on the instance configuration, such as the region, instance type, and storage capacity. For more information, visit the ApsaraDB RDS buy page.
Restore data to a new RDS instance
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the 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.
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.
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 backup set.
The By Time option is available only after the log backup feature is enabled.
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.
The available RDS editions vary based on the region and database engine version that you select. For more information, see Overview.
You can select the Single-zone Deployment or Multi-zone Development method. 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.
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.
General-purpose (Entry-level): allows you to select a general-purpose instance type. A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources, but shares CPU and storage resources with the other general-purpose RDS instances that are deployed on the same server.
Dedicated (Enterprise-level): allows you to 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. Dedicated host instance types provide the highest specifications in the dedicated instance family. A dedicated host RDS instance occupies all CPU, memory, storage, and I/O resources on the physical host where the RDS instance is deployed.
Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary ApsaraDB RDS instance types.
The storage capacity that is provisioned to store data files, system files, log files, and transaction files in the RDS instance. You can change the storage capacity at a step size of 5 GB.Note
A dedicated RDS instance that uses local disks 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.
The network type of the RDS instance. Select VPC. A virtual private cloud (VPC) is an isolated network that provides higher security and better 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.Note
Make sure that the RDS instance and the ECS instance to which you want to connect have the same network type. If their network types are different, they cannot communicate over an internal network.
The resource group to which the RDS instance belongs.
Click Next: Confirm Order.
Confirm the settings in the Parameters section, configure 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 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 to the original RDS instance. For more information, see Migrate data between RDS instances.
When data is migrated from the new RDS instance to the original RDS instance, the workloads that run on the original RDS instance are not interrupted.