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 left-side navigation pane, click Clusters.
In the upper-left corner, select the region in which 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
Clone Type
Select Restore to Point in Time.
Region
This parameter is fixed to the region where the original cluster resides. You do not need to configure this parameter.
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.
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
This parameter is fixed to VPC. You do not need to configure this parameter.
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 virtual private cloud (VPC) as the ECS instance to which you want to connect. Otherwise, the cluster and the Elastic Compute Service (ECS) instance cannot communicate over the internal network to achieve optimal performance.
VSwitch
Compatibility
This parameter is automatically set to the Compatibility value of the original cluster. You do not need to change this value.
For example, if the Compatibility value of the original cluster is PostgreSQL 14 (fully compatible with PostgreSQL 14), the Compatibility value here also is PostgreSQL 14.
Product Edition
This parameter is automatically set to the Product Edition value of the original cluster. You do not need to change this value.
Edition
This parameter is automatically set to the Edition value of the original cluster. You do not need to change this value.
Specification Type
Dedicated and General-purpose are available for Specification Type.
Dedicated: The cluster does not share allocated compute resources such as CPUs with other clusters on the same server. This improves the reliability and stability of the cluster.
General-purpose: The cluster shares idle computing resources such as CPUs with other clusters on the same server. This enhances cost efficiency.
CPU Architecture
This parameter is automatically set to the CPU Architecture 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 a cluster 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.
PolarProxy Type
The edition of the new cluster. This parameter is fixed to Standard Enterprise. You do not need to change this value.
Enable Hot Standby Cluster
Select whether to Enable Hot Standby Storage Cluster.
If the hot standby storage cluster feature is enabled, both the primary PolarDB cluster and the hot standby storage cluster are deployed in the same region. The two clusters each have three replicas, which adds up to six replicas. This delivers higher SLA than when this feature is disabled.
If this feature is disabled, only the primary cluster is deployed. The cluster has three replicas, and the storage unit price is half of that when this feature is enabled. This delivers lower SLA than when this feature is enabled.
Storage Type
PolarDB Enterprise Edition supports the PSL5 and PSL4 storage types:
PSL5: the storage types supported in the historical versions of PolarDB. This storage type 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 keeping a high disk performance.
NoteYou cannot change the storage type of an existing cluster. If you want to change the storage type, you need to create a new cluster with the desired storage type and then migrate data to the new cluster.
For more information about the two storage types, see Comparison between PSL4 and PSL5.
PolarDB Standard Edition supports the following storage types:
Enterprise SSDs (ESSDs) of performance level 0 (PL0): A PL0 ESSD delivers the basic performance of an ESSD.
PL1 ESSDs: A PL1 ESSD delivers IOPS that is five times that delivered by a PL0 ESSD and throughput that is approximately twice that delivered by the PL0 ESSD.
PL2 ESSDs: A PL2 ESSD delivers IOPS and throughput that are approximately twice the IOPS and throughput delivered by a PL1 ESSD.
PL3 ESSDs: A PL3 ESSD delivers IOPS that is up to ten times that delivered by a PL2 ESSD and throughput that is up to five times that delivered by the PL2 ESSD. The ESSDs are suitable for business scenarios in which highly concurrent requests must be processed with high I/O performance and at low read and write latencies.
ESSD AutoPL disks: Compared with an ESSD at one of the preceding PLs, an ESSD AutoPL disk decouples IOPS and storage, gives you the flexibility to configure IOPS and storage, and allows you to make some adjustments as needed. This reduces the overall Total Cost of Ownership (TCO).
For more information about the performance of ESSDs, see ESSDs.
ImportantAfter the storage of an ESSD is exhausted, the disk is locked. In this case, the disk handles only read operations.
Storage Billing Method
PolarDB supports the Pay-as-you-go and Subscription storage billing methods.
Pay-as-you-go: The storage capacity dynamically scales as the data volume increases or decreases. You do not need to specify the storage capacity when creating a cluster, and you are charged for the storage usage.
Subscription: You must purchase a specific amount of storage capacity when you create a cluster.
For more information about the two storage billing methods, see Billing methods for storage and .
NoteIf you set the Product Type parameter to Subscription, you can set the Storage Billing Method parameter to Pay-as-you-go or Subscription.
If you set the Product Type parameter to Pay-as-you-go, the Storage Billing Method parameter is unavailable, and you are charged for storage based on the pay-as-you-go billing method.
Storage Cost
You do not need to specify the required storage when you set the Storage Billing Method parameter to Pay-as-you-go. You are charged for storage usage on an hourly basis in PolarDB. In addition, you can purchase storage plans based on your business requirements. For more information about how to purchase a storage plan, see Purchase a storage plan.
Storage Capacity
The amount of storage capacity that you want to purchase for your cluster. The storage capacity of a PolarDB cluster of Enterprise Edition ranges from 50 GB to 500 TB, in 10 GB increments.
NoteIf you set the Product Type parameter to Subscription and the Storage Billing Method parameter to Subscription, the Storage Capacity parameter is available.
Cluster Name
The name of the cluster. The name 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.
Purchase Plan
The subscription duration of the new cluster.
NoteThis parameter is valid only when the Billing Method parameter is set to Subscription.
Number
The number of clusters that 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.
The point-in-time restoration duration is the sum of the time required to restore data from backup sets (snapshots) and the time required to restore data from physical logs. If restoration from backup sets (snapshots) has a log interval and the write loads are high, restoration from physical logs requires a certain amount of time. For more information, see Physical log backup.
Related API operations
Operation | Description |
Restores data of a PolarDB cluster. Note You must set CreationOption to CloneFromPolarDB. |