Full restoration is a method of restoring all historical data of a PolarDB cluster to a new cluster. After you verify the accuracy of the data in the new cluster, you can migrate the restored data to the original cluster. Full restoration can be performed based on backup sets or points in time. This topic describes how to restore all historical data of a cluster to an earlier point in time.

Note

  • 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.
  • You can restore data to a specified point in time within a specific time range. The time range varies based on the Log Retention Period (Days) parameter in the backup settings. The default time range is 7 days.

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 > Backup and Restore.
  5. Perform a restoration based on a point in time.
    • Restoration within a region:

      On the Backup and Restore page, click Point-in-time Restore.

    • Restoration across regions:
      1. On the Backup and Recover page, select the region where the data to be restored resides.
      2. Click Point-in-time Restore.
  6. 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 for the use of storage resources and the fees are deducted from your account balance on an hourly basis.
    • Pay-as-you-go: An upfront payment is not required. You are charged for the compute nodes and the amount of storage that is consumed by your data. The fees are deducted from your account balance on an hourly basis.
  7. Set the parameters that are described in the following table.
    Parameter Description
    Clone Source Type Select Backup Timepoint.
    Backup Timepoint The point in time to which you want to restore data.
    Note The time range within which data can be restored to a specified point in time varies based on the Log Retention Period (Days) parameter in the backup settings. The default time range is 7 days.
    Region Select the region to which the data is to be restored.
    Note
    • Cross-region backup can be used to restore data to an instance in the source or destination region.
    • If cross-region backup is not enabled, the region of the new cluster is the same as that of the original cluster and does not need to be specified.
    Primary Zone Select the primary zone where you want to deploy the new cluster.
    Note In regions that have two or more zones, PolarDB automatically replicates data to the secondary zones for disaster recovery.
    Network Type This parameter is automatically set to VPC. You do not need to change this value.
    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.
    Note Make 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 value of Compatibility that is specified for the original cluster is MySQL 8.0, Compatibility is automatically set to MySQL 8.0 for the new cluster. The value of MySQL 8.0 specifies that the cluster is fully compatible with MySQL 8.0.

    Edition This parameter is automatically set to the edition of the original cluster. You do not need to change this value.

    For example, if the edition of the original cluster is Cluster (2 to 16 Nodes) (Recommended), the edition of the new cluster is automatically set to Cluster (2 to 16 Nodes) (Recommended). For more information, see Overview.

    Specification Type Select General-purpose or Dedicated for PolarDB for MySQL Cluster Edition. Valid values:
    • Dedicated: Computing resources such as CPUs that are allocated to each cluster are exclusive to the cluster. This improves the stability and reliability.
    • General-purpose: Idle computing resources such as CPUs are shared among clusters on the same server for cost-effectiveness.

    For more information about the comparison between the types of specifications, see Comparison between general-purpose and dedicated compute nodes.

    Note This parameter is available only if the edition of the original cluster is Cluster (2 to 16 Nodes) (Recommended). The Single Node (Starter) do not support this parameter.
    Node Specification Select a node specification. The maximum storage and performance of a cluster vary based on the node specification. For more information, see Specifications of compute nodes.
    Note We recommend that you select a node specification that is the same or higher than the node specification of the original cluster. This ensures that the new cluster runs as expected.
    Nodes
    • If the edition of the original cluster is Cluster (2 to 16 Nodes) (Recommended), the number of nodes is automatically set to 2 for the new cluster. You do not need to change this value.
      Note By default, a new cluster of the Cluster Edition contains one primary node and one read-only node. After the new cluster is created, you can add only read-only nodes to the new cluster. Each cluster can contain a maximum of 15 read-only nodes. For more information, see Add or remove read-only nodes.
    • If the edition of the original cluster is Single Node (Starter), the number of nodes is automatically set to 1 for the new cluster. You do not need to change this value.
    PolarProxy PolarDB supports Standard Enterprise Edition and Dedicated Enterprise Edition database proxy types.
    • Standard Enterprise Edition: If your cluster is General-purpose, you can select this database proxy type, which shares CPU resources with smart elastic scaling within seconds provided based on business loads.
    • Dedicated Enterprise Edition: If your cluster is Dedicated, you can select this database proxy type, which occupies all allocated CPU resources and provides better stability.

    Compared with the previous free edition of PolarProxy, PolarProxy Enterprise Edition provides additional advanced features such as the multi-primary architecture, compute nodes with elastic scaling within seconds, and proxy throttling protection. For more information, see Overview.

    Note At present, you can use PolarProxy Enterprise Edition free of charge. In the future, when to charge the fees is to be determined.
    Storage type PolarDB supports the High-performance Edition and Standard Edition storage types.
    • High-performance Edition: the storage type supported by historical versions of PolarDB. This was the default storage type for PolarDB clusters purchased before June 7, 2022. It delivers higher performance, reliability and availability. This storage type is also called PSL5.
    • Standard Edition: a new storage type for PolarDB. Standard Edition uses the Smart-SSD technology developed in-house by Alibaba Cloud to compress and decompress data at the SSD disk level. This storage type can minimize the storage costs of data while maintaining a high disk performance. This storage type is also called PSL4.
      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.
    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, see Purchase a storage plan.
    Cluster Name The name of the cluster. The name must meet the following requirements:
    • It cannot start with http:// or https://.
    • It must be 2 to 256 characters in length.

    If you do not configure this parameter, the system automatically generates a cluster name. You can change the name after the cluster is created.

    Purchase Plan Select a purchase plan for the new cluster.
    Note This parameter is available only if Billing Method is set to Subscription.
    Number Select the number of clusters that you want to purchase.
  8. 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
      1. Click Buy Now.
      2. On the Purchase page, confirm the information about the unpaid order and the payment method, and then click Purchase.
    Note After 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.

What to do next

  1. Log on to the new cluster and verify data accuracy. For more information about how to log on to the cluster, see Connect to a cluster.
  2. Migrate data to the original cluster.

    After you verify the data in the new cluster, you can migrate the data from the new cluster back to the original cluster. For more information, see Migrate data between PolarDB for MySQL clusters.

    Note Data migration is a process of replicating data from a cluster to another cluster. During data migration, your services in the original cluster are not affected.

Related API operations

Operation Description
CreateDBCluster Restores the data of a PolarDB cluster.
Note You must set CreationOption to CloneFromPolarDB.