Cluster restoration refers to restoring all data of a PolarDB cluster to a new cluster. After you verify the new cluster's data accuracy, you can migrate the restored data to the original cluster. Cluster restoration supports two methods: restore from a backup set and restore data to a previous 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 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 where the cluster that you want to manage is deployed.
  3. Find the cluster you want to manage and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Backup and Restore.
  5. Find the backup set that you want to restore and click Restore to New Cluster in the Actions column.
    2
  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: An upfront payment is not required. You are charged for compute nodes and the amount of storage that is consumed by your data. These costs are deducted from your account balance on an hourly basis.
  7. Configure the following parameters.
    Parameter Description
    Clone Source Type Select Backup Set.
    Region By default, the region of the new cluster is the same as that of the original cluster. This setting cannot be changed.
    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.
    Primary Availability Zone Select the primary zone where the cluster is deployed.
    Note In regions that have two or more zones, PolarDB automatically replicates data to the secondary zone for disaster recovery.
    Network Type This parameter can only be set to VPC.
    VPC Select a VPC and a VSwitch for the cluster. We recommend that you use the same VPC and vSwitch that are used for the original cluster.
    Note Make sure that the PolarDB cluster and the ECS instance you want to connect to the cluster are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over the internal network, which results in decreased performance.
    VSwitch
    Compatibility By default, the new cluster has the same compatibility as that of the original cluster.

    For example, if the compatibility of the original cluster is MySQL 8.0 (fully compatible with MySQL 8.0), the compatibility of the new cluster is also MySQL 8.0.

    Specification Type PolarDB for MySQL Cluster has the following two types of specifications: General Specification and Dedicated Specification.

    For more information about 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 .
    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 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
    • The default number of nodes of the Cluster edition is 2. You do not need to change this parameter value.
      Note By default, a new cluster of Cluster contains one primary node and one read-only node. After a cluster is created, you can add nodes to the cluster. A cluster can contain one primary node and up to 15 read-only nodes. For more information about how to add nodes, see Add or remove read-only nodes.
    • The default number of nodes of the Single Node (Starter) and Archive Database (High Compression Ratio) editions is 1. You do not need to change this parameter value.
    Storage Cost You do not need to select the storage capacity when you purchase PolarDB clusters. You are charged for the storage capacity used on an hourly basis. You can also purchase a storage plan based on your business requirements. For more information about how to purchase a storage plan, 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 specify this parameter, the system automatically generates a cluster name. You can change the name after the cluster is created.

    Purchase Plan Specify Purchase Plan for the cluster.
    Note This parameter is available only when the Billing Method parameter is set to Subscription.
    Number Select the number of clusters 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 of the unpaid 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.

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 on 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

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