Skip to content

Clone Cluster

Warning

Clone Cluster is mark as deprecated since the release of clustercontrol-controller-2.3.1-12185. Due to bugs and issues encountered, in previous versions, Clone Cluster might not work properly and job might fail. Instead, use Create Cluster from Backup

Cloning a cluster in ClusterControl shares a similar concept and model with Creating Replica Cluster functionality. In Cloning a cluster, it is only applicable and available to work on a MySQL Galera Cluster.

Listed below are the procedures that this functionality in ClusterControl applies:

  • Create a new cluster consisting of one node
  • Stage the new cluster with SST (it is now cloned);
  • Nodes will be added to the cloned cluster until cloned cluster size is reached;
  • Query monitor settings and settings for Cluster recovery and Node recovery options are not cloned;
  • The my.cnf file may not be identical on the cloned cluster;

ClusterControl performs the cloning operation online, without any locking or bringing downtime to the existing cluster. It’s like a cluster scale out operation except both clusters are independent to each other after the syncing completes. The cloned cluster does not necessarily need to be as the same cluster size as the existing one. Cloning a cluster can start with one-node cluster, and scale it out with more database nodes at a later stage.

Support Matrix

The following database cluster types, vendors and topology are supported:

Database Vendor Topology Version Supported
Galera Cluster MariaDB Galera Galera certification-based replication 10.4.x and later

Prerequisites

There are prerequisites that need to be fulfilled prior to the deployment of a replica cluster. See list below:

  • Make sure the target database nodes are running on a supported architecture platform and operating system. See Hardware and Operating System.
  • Passwordless SSH (SSH using key-based authentication) is configured from the ClusterControl node to all database nodes. See SSH Key-based Authentication.
  • Verify that sudo is working properly if you are using a non-root user. See Operating System User.
  • The Source Cluster and the Cloned Cluster must have the exact major and minor database version of database (for example, source has MariaDB Galera 11.4.4, the Cloned Cluster must have installed 11.4.4 as well)
  • The Galera SSL Encryption in a Galera cluster must be disabled.

Galera Cluster

A minimal setup is comprised of one Galera node (no high availability). Recommended setup should be at least 3-nodes at bare minimum for high availability. Having one node is acceptable but you can scale out later and add more primary or database nodes.

The following vendors and versions are supported for this feature.

  • MariaDB Cluster - 10.4, 10.5, 10.6 (LTS), 10.11 (LTS) and 11.4 (LTS).

Default configuration

When cloning a cluster, ClusterControl will simply copy the configuration from the Source Cluster, having most parameters or options the same. If the Source Cluster was deployed initially using ClusterControl, check and see Default Configuration to know more about the default settings. ClusterControl will only change the IP or hostname that is necessary for the cloned cluster to run based on the configuration. Other than that, create replica cluster shall have these default configuration but can be modified or changed in the GUI. See the following list below:

  • Shall use vendor repositories when pulling and instaling packages
  • Disable firewall is uncheck
  • Disable SELinux/AppArmor is uncheck
  • cluster name shall have default values of Clone of (<your_source_cluster_name>)

Deployment steps

  1. Go to the Clusters dashboard. Choose your target source cluster and click the ellipsis button (...)

  2. Choose Clone/Replicate the cluster → Clone cluster

  3. First step is Configuration.

    1. By default, the Cluster name sets it to string name Clone of (<your_source_cluster_name>). Replace the string name if this is not the desired cluster name.

    2. In the Repository field, default value is set to Use vendor repositories. Other options are Do not setup vendor repositories and Create new repository. If choosing Do not setup vendor repositories, this shall not install the vendor repository leaving to use AppStream or your main repository. If choosing Create new repository, this shall create/mirror the vendor's repositories. Deploy with the mirrored repositories.

    3. Security configuration to either disable firewall or SELinux/AppArmor. Leave check if you need to Disable firewall (default). Leave check if you need to Disable SELinux/AppArmor (default). Otherwise uncheck if any of the two needs not be disabled. If you have uncheck Disable SELinux/AppArmor, make sure that you have configured properly to allow creating files and opening sockets for the database to run properly.

  4. Click Continue.

  5. Second step is Add hos.

    1. Fill in the IP address or hostname in the Node field of your target cloned cluster node. You can add more than one just make sure to hit the + button.
  6. Click Continue to proceed the last step Preview.

  7. Third and the last step is Preview, this is the last step where it shows all the values and choosen options for the ClusterControl to use for setting up the cloned cluster.

To be added soon

Recommended Next Steps