This topic describes how to create a new PolarDB cluster by cloning the data of a source PolarDB cluster.
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 cluster by cloning the data of a source PolarDB cluster. Then, you can conduct tests on the new cluster. This ensures the accuracy of the tests without affecting normal business operation.
- 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.
- Log on to the PolarDB console.
- In the upper-left corner of the console, select the region where the cluster is deployed.
- Find the cluster that you want to clone and choose Actions column. in the
- On the Clone Instance page, select a billing method for the new cluster.
- Subscription: Pay for the compute nodes when you create the cluster. You are charged by hour for the storage space that is occupied by the actual amount of data. The charges are deducted from your account balance on an hourly basis.
- Pay-As-You-Go: An upfront payment is not required. You are charged by hour for the compute nodes and the storage space that is consumed by the actual amount of data. The charges are deducted from your account balance on an hourly basis.
- Configure the following parameters.
Parameter Description Clone Source Type By default, Current Cluster is selected.For this operation, do not change this setting. Clone Source Cluster The ID of the source cluster to clone. This setting cannot be changed. Region By default, the region of the new cluster is the same as that of the original cluster. This setting cannot be changed. 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 a 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 source cluster. For example, if the compatibility of the source cluster is MySQL 8.0, , and , the compatibility of the new cluster is MySQL 8.0, , and . You do not need to change this parameter value. Edition By 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 (2-16 Nodes) (Recommended), the edition of the new cluster is also Cluster (2-16 Nodes) (Recommended). You do not need to change this parameter value. Specification Type ApsaraDB PolarDB MySQL-compatible edition Cluster Edition has the following two types of specifications: General Specification and Dedicated Specification.
- Dedicated: The 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 two types of specifications, see Comparison between general-purpose compute nodes and dedicated compute nodes.Note This parameter is available only when the edition of the source cluster is Cluster (2-16 Nodes) (Recommended). The Single Node (Starter) and Archive Database (High Compression Ratio) editions do 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 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 (2-16 Nodes) (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 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
- 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 the 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.
- Read and accept the terms of service, and complete the rest of the steps based on the billing method of the cluster.
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.
Click Buy Now.
- Click Buy Now.
- On the Purchase page, confirm the information of the unpaid order and the payment method and click Purchase.