All Products
Search
Document Center

PolarDB:Restoration method 1: Restore data to a specific point in time

Last Updated:Oct 16, 2023

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.

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

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Restoration.
  5. On the Restoration page, click Point-in-time Restoration.
  6. On the Clone Instance page, select a billing method for the new cluster.
    • Subscription: When you create a cluster, you must pay for compute nodes. You are charged for the use of storage resources and the costs 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.
  7. Configure the parameters that are listed in the following table.
    ParameterDescription
    Action ModeSelect Restore to Point in Time.
    Backup Point in TimeThe point in time to which you want to restore data.
    Note You 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 ZoneSelect the primary zone where the cluster resides.
    Note In regions that have two or more zones, PolarDB automatically replicates the data to the secondary zone for disaster recovery.
    Network TypeThe default value is VPC.
    VPCSelect 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.
    Note Make sure that the PolarDB for MySQL 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.

    EditionThis parameter is automatically set to the edition value of the original cluster. You do not need to change this value.
    Resource TypeThis parameter is automatically set to the Resource Type value of the original cluster. You do not need to change this value.
    Node SpecificationSelect a node specification. The maximum storage capacity and the performance of clusters vary based on the node specifications. For more information, see Node specifications.
    Note We 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.
    NodesThe default value is 2.
    Note By 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 TypePolarDB for MySQL supports the High-performance Edition and Standard Edition storage types.
    • PSL5: the storage types supported in the historical versions of PolarDB. It delivers higher performance, reliability and availability. This storage type is also called PSL5.
    • 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.
    Note The storage type of existing clusters cannot be changed to Standard Edition. To use Standard Edition, we recommend that you purchase a new cluster, set the storage type to Standard Edition, and then migrate data to the new cluster.

    For more information about the two storage types, see Comparison between PSL4 and PSL5.

    Storage CostYou do not need to select the storage capacity when you purchase PolarDB clusters. You are charged for the used storage space on an hourly basis. You can also purchase a storage package to offset storage fees. For more information about how to purchase a storage package, see Purchase a storage plan.
    Cluster NameThe 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.

    Subscription DurationSelect a Subscription Duration value for the PolarDB cluster.
    Note This parameter is valid only when the Billing Method parameter is set to Subscription.
    NumberSet the Number value of the PolarDB cluster.
  8. Read and select the terms of service, and then complete the payment based on the selected billing method.
    • Pay-as-you-go

      Click Buy Now.

    • Subscription
      1. Click Buy Now.
      2. On the Purchase page, confirm the order and the payment method, and click Purchase.
    Note After you complete the payment, it requires 10 to 15 minutes to create the cluster. Then, you can view the new cluster on the Clusters page.

Related API operations

OperationDescription
CreateDBClusterRestores data of a PolarDB cluster.
Note You must set CreationOption to CloneFromPolarDB.