Cluster restoration refers to restoring all historical data of a PolarDB cluster to a new cluster. After you verify the accuracy of data in the new cluster, you can migrate the restored data to the original cluster. All historical data of a PolarDB cluster can be restored from a backup set or to an earlier point in time. This topic describes how to restore all historical data of a cluster from a backup set.

Precautions

Only the data and account information of the original cluster can be restored to a new cluster. The parameter settings 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 > Backup and Restore.
  5. Restore data to a new cluster.
    • If you want to restore data from a backup set to a new cluster in the same region as the backup set, perform the following operations:

      Find the backup set from which you want to restore data and click Restore to New Cluster in the Actions column.

    • If you want to restore data from a backup set in a specific region to a new cluster in another region, perform the following operations:
      1. On the Backup and Restore page, select the region in which the backup set is located.
      2. Find the backup set from which you want to restore data and click Restore to New Cluster in the Actions column.
  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. Configure the parameters described in the following table.
    Parameter Description
    Clone Source Type Select Backup Set.
    Clone Source Backup Set Select the backup set from which you want to restore data.
    Note The Start Time of each backup set is displayed. You can determine whether to select the backup set based on this backup time.
    Region Select the destination region in which the new cluster is located.
    Note
    • If you enable cross-region backup, you can restore data from the backup set to clusters in the source and destination regions.
    • By default, if you do not enable cross-region backup, the new cluster is located in the same region as the original cluster. You do not need to change this value.
    Primary Zone Select the primary zone in which 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 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.
    • 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 information about the comparison between the two types of specifications, see Comparison between general-purpose and dedicated compute nodes.

    Note This parameter is available only when the edition of the original cluster is Cluster (2 to 16 Nodes) (Recommended). The Single Node (Starter) does not support this parameter.
    Node Specification Select a node specification. The maximum storage capacity and performance of clusters vary based on node specifications. For more information, see Specifications of compute nodes.
    Note To ensure that the new cluster runs as expected, we recommend that you select a node specification that is higher than the node specification of the original cluster.
    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 Type PolarDB supports Standard Enterprise Edition and Dedicated Enterprise Edition database proxy types.
    • Standard Enterprise Edition: If your cluster is a General-purpose cluster, you can select this database proxy type, which shares CPU resources and provides smart elastic scaling capabilities within seconds based on business loads.
    • Dedicated Enterprise Edition: If your cluster is a Dedicated cluster, 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-master architecture, compute nodes with elastic scaling within seconds, and proxy throttling protection. For more information, see Overview.

    Note The PolarProxy Enterprise Edition is currently available free of charge but may be charged in the future.
    Storage Type PolarDB supports the High-performance and Standard storage types.
    • High-performance: This is the storage type supported by historical versions of PolarDB and the default storage type for PolarDB clusters purchased before June 7, 2022. This storage type is also called PSL5. It delivers higher performance, reliability and availability.
    • Standard: This is a new storage type for PolarDB. This storage type uses the technology developed in-house by Alibaba Cloud to compress and decompress data at the SSD level. This can minimize the storage costs of data while maintaining a high disk performance. This storage type is also called PSL4. For information about Smart-SSD, see Smart-SSD.
      Note The storage type of existing clusters cannot be changed to PSL4. To use PSL4, we recommend that you purchase a new cluster, set the storage type of the new cluster to PSL4, and then migrate data to the new cluster.
    Storage Cost You do not need to select the storage capacity when you purchase PolarDB clusters. 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 when 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.