All Products
Search
Document Center

PolarDB:Clone a cluster

Last Updated:Oct 19, 2023

This topic describes how to create a new PolarDB for MySQL cluster by cloning the data of a source PolarDB for MySQL cluster.

Scenarios

Before you launch a service, the service is deployed in an environment that simulates real-world scenarios for testing, such as stress testing. To achieve this, you can create a new PolarDB for MySQL cluster by cloning the data of a source PolarDB for MySQL cluster. Then, you can conduct tests on the new cluster. This ensures the accuracy of the tests without affecting normal business operation.

Considerations

  • The following data of the source cluster can be cloned:
    • Cluster account information.
    • The transparent data encryption (TDE) configurations can be cloned if the source cluster has TDE enabled.
  • The following data of the source cluster cannot be cloned:
    • Parameter settings
    • Whitelist configurations
    • Secure sockets layer (SSL) configurations
  • Only the data that exists in the source cluster before the clone operation starts is cloned.

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 that you want to clone and choose More > Clone Data to New Cluster in the Actions column.
  4. On the Clone Instance page, select a billing method for the new cluster.
    • Subscription: When you create a cluster, you need to make a payment for the use of the cluster for a specific period of time.
    • Pay-as-you-go: When you create clusters, you do not need to make a payment first. You are charged for the computing and storage resources that you use.
  5. Configure the following parameters.
    ParameterDescription
    Clone Source TypeBy default, Current Cluster is selected. For this operation, do not change this setting.
    Clone Source ClusterThe ID of the source cluster to clone. This setting cannot be changed.
    RegionBy default, the region of the new cluster is the same as that of the original cluster. This setting cannot be changed.
    Primary Availability ZoneSelect the primary zone where the cluster is deployed.
    Note In regions that have two or more zones, PolarDB for MySQL automatically replicates data to a secondary zone for disaster recovery.
    Network TypeThis parameter can only be set to VPC.
    VPCSelect 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 for MySQL 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
    CompatibilityBy default, the new cluster has the same compatibility as that of the source cluster. For example, if the compatibility of the source cluster is , PostgreSQL 11, and , the compatibility of the new cluster is , PostgreSQL 11, and . You do not need to change this parameter value.
    EditionBy default, the edition of the new cluster is the same as that of the source cluster. For example, if the edition of the source cluster is Cluster Edition(Recommended), the edition of the new cluster is also Cluster Edition(Recommended). You do not need to change this parameter value.
    Specification TypeBy default, this parameter is set to Dedicated Specification
    Node SpecificationSelect a node specification. The maximum storage capacity and performance of clusters vary based on node specifications. For more information, see Compute node specifications of PolarDB for MySQL Enterprise Edition.
    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(Recommended) edition is 2. You do not need to change this parameter value.
      Note By default, new Cluster Edition clusters contain 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 .
    • The default number of nodes of the Single Node Edition (Starter) and Archive Database Edition editions is 1. You do not need to change this parameter value.
    PolarProxy TypeBy default, this parameter is set to Dedicated Enterprise.
    Enable Hot Standby ClusterSpecifies whether to enable the hot standby cluster feature.
    • When this feature is enabled, the primary cluster and a hot-standby cluster for the primary cluster are deployed in the specified region. The primary cluster contains compute nodes that serve as standbys for each other, and primary storage. The two clusters each have three replicas, which adds up to six replicas. This delivers higher SLA than when this feature is disabled.PolarDB for MySQL
    • When 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 TypePolarDB for MySQL supports the PSL5 and PSL4 storage types.
    • PSL5: the storage types supported in the historical versions of PolarDB. It 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 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 Billing MethodPolarDB for MySQL supports the Pay-as-you-go and Subscription billing methods for the storage of your clusters.
    • Pay-as-you-go: The storage capacity is provided based on a serverless architecture. This way, you do not need to specify the storage capacity when you purchase clusters. The storage capacity of the clusters can be automatically scaled up as the volume of data increases. You are charged for the actual data volume.
    • Subscription: You must purchase a specific amount of storage capacity when you create the cluster.

    For more information about the two storage billing methods, see Billing methods for storage and .

    Note When Product Type is set to Subscription, the Storage Billing Method parameter can be set to Pay-as-you-go or Subscription. When Product Type is set to Pay-as-you-go, the Storage Billing Method parameter is unavailable, and the storage is billed on a pay-as-you-go basis.
    Storage CostYou do not need to select the storage capacity when you purchase PolarDB for MySQL 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 NameThe 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 PlanSpecify the purchase plan for the cluster.
    Note This parameter is available only when the Billing Method parameter is set to Subscription.
    NumberSelect the number of clusters you want to purchase.
  6. 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.