PolarDB for PostgreSQL provides two methods for you to restore historical data to a new cluster: restore data to a specific point in time and restore data from a backup set (snapshot). This topic describes how to restore data to a specific point in time.
Precautions
Only the data and account information of the original cluster can be restored to a new cluster. The parameters of the original cluster cannot be restored to the new cluster.
Procedure
Log on to the PolarDB console.
In the upper-left corner, select the region where the cluster is deployed.
Find the cluster and click its ID.
In the left-side navigation pane, choose .
On the Backup and Restoration page, click Point-in-time Restoration.
On the Clone Instance page, select a billing method for the new cluster.
Subscription: When you create a cluster, you must pay for the compute nodes. You are charged fees for the storage resources that you use and the fees are deducted from your account balance on an hourly basis.
Pay-As-You-Go: If you select the pay-as-you-go billing method, you pay for the resources after you use them. You are charged for the compute nodes and the used storage space on an hourly basis. The fee is deducted from your account balance on an hourly basis. We recommend that you select the Pay-As-You-Go billing method for the short-term use. You can reduce costs by releasing the cluster based on your business requirements.
Configure the parameters that are described in the following table.
Parameter
Description
Action Mode
Select Restore to Point in Time.
Backup Point in Time
The point in time to which you want to restore data.
NoteYou can restore your cluster to a particular time only over the past 7 days.
Region
This parameter is automatically set to the region of the original cluster. You do not need to change this value.
Primary Zone
Select the primary zone where the cluster resides.
NoteIn regions that have two or more zones, PolarDB automatically replicates the data to the secondary zone for disaster recovery.
Network Type
The default value is VPC.
VPC
Select a VPC and a vSwitch for the new cluster. We recommend that you select the same VPC and vSwitch that are connected to the original cluster.
NoteMake sure that the PolarDB cluster is created in the same VPC as the ECS instance to which you want to connect. Otherwise, the cluster and the ECS instance cannot communicate over the internal network to achieve optimal performance.
vSwitch
Compatibility
This parameter is automatically set to the value of Compatibility that is specified for the original cluster. You do not need to change this value.
For example, if the Compatibility value of the original cluster is PostgreSQL 11 (fully compatible with PostgreSQL 11), the Compatibility value here also is PostgreSQL 11.
Edition
This parameter is automatically set to the edition value of the original cluster. You do not need to change this value.
Resource Type
This parameter is automatically set to the Resource Type value of the original cluster. You do not need to change this value.
Node Specification
Select a node specification. The maximum storage capacity and the performance of clusters vary based on the node specifications. For more information, see Node specifications.
NoteWe recommend that you select a node specification that is higher than the node specification of the original cluster. This ensures that the new cluster runs as expected.
Nodes
The default value is 2.
NoteBy default, a new cluster has one primary node and one read-only node. After the cluster is created, you can add nodes to the cluster. A cluster can contain one primary node and a maximum of 15 read-only nodes. For more information about how to add nodes, see Add or remove a read-only node.
Storage Type
PolarDB provides two storage types: PSL5 and PSL4.
PSL5: the storage types supported in the historical versions of PolarDB. It delivers higher performance, reliability and availability.
PSL4: a new storage type for PolarDB. PSL4 uses the Smart-SSD technology developed by Alibaba Cloud to compress and decompress data at the physical SSD disk level. This can minimize the storage price of data while keep a high disk performance.
NoteThe storage type of existing clusters cannot be changed. To use PSL4, we recommend that you purchase a new cluster, set the storage type to PSL4, and then migrate data to the new cluster.
For more information about the two storage types, see Comparison between PSL4 and PSL5.
Storage Cost
You do not need to specify the required storage when you purchase the PolarDB cluster. You are charged for storage usage on an hourly basis. In addition, you can purchase storage plans based on your business requirements. For more information about how to purchase a storage package, see Purchase a storage plan.
Cluster Name
The name of the new PolarDB cluster must meet the following requirements:
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_) and hyphens (-). The name must start with a letter.
The name must start with a letter.
The name can contain digits, periods (.), underscores (_), and hyphens (-).
If you leave this field empty, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.
Duration
Select a duration for the new cluster.
NoteThis parameter is valid only when the Billing Method parameter is set to Subscription.
Quantity
Set the number of PolarDB clusters you want to purchase.
Read and accept the Terms of Service, and complete the rest of the steps based on the billing method of the cluster.
Pay-as-you-go
Click Buy Now.
Subscription
Click Buy Now.
On the Purchase page, confirm the order and the payment method, and click Purchase.
NoteAfter you complete the payment, it takes 10 to 15 minutes to create the cluster. Then, you can view the new cluster on the Clusters page.
Related API operations
Operation | Description |
Restores data of a PolarDB cluster. Note You must set CreationOption to CloneFromPolarDB. |