So cloning is a great subject. I mean we clone sheep, we can clone human organs in time we might be able to clone humans, but thats a topic for scientist and philosophers.
Take a Clone it will last longer appeared first on MariaDB.org
So cloning is a great subject. I mean we clone sheep, we can clone human organs in time we might be able to clone humans, but thats a topic for scientist and philosophers.
What is MySQL Replicaion:
The MySQL clone plugin can be used to replicate data from a MySQL server to another MySQL server, and it supports replication. The cloning process creates a physical snapshot of the data, including tables, schemas, tablespaces, and data dictionary metadata. It tracks replication coordinates from the source server and transfers them to the replica, which allows replication to begin at a consistent position in the replication stream. This data includes the binary log position (filename, offset) and the gtid_executed GTID set. The replication metadata repositories are also copied during the cloning operation.
The clone plugin that was released with MySQL Version 8.0.17. Its quick and very easy to setup. You can use it for so many different solutions. I’ve listed some common ones below, but I know that there are many more use cases.
In this article I will cover the basics of setting up and running a clone from and existing MySQL server. I will be using MySQL version 8.0.36.
Prepare the Source ServerInstall Clone plugin
source > INSTALL PLUGIN clone SONAME 'mysql_clone.so';Verify the clone plugin was installed.
source > show plugins;
Create Clone User
Now we need to create a user to run the clone process. I highly suggest you create a user for the cloning. Please don’t use an ID with full admin rights. Create a user with the least amount of privileges needed.
source > CREATE USER 'clone_user'@'%' IDENTIFIED BY 'S3k3rtPassWd';
source > GRANT BACKUP_ADMIN ON *.* TO 'clone_user'@'%';Verify your new clone user.
source > show grants for clone_user;
Preparation on the source server is complete. Lets move on to the clone.
Prepare the Clone ServerInstall plugin
clone > INSTALL PLUGIN clone SONAME 'mysql_clone.so';Verify the clone plugin was installed.
clone > show plugins;
Define Source Server
You can use the source host name or host IP address.
clone > SET GLOBAL clone_valid_donor_list='SOURCE_HOSTNAME:3306';We are now ready to kick off the cloning.
clone > CLONE INSTANCE FROM clone_user@SOURCE_HOSTNAME:3306 IDENTIFIED BY 'S3k3rtPassWd';Cloning should start now. If you have any issues, check your log files and very the steps above. Now that the cloning is running we can monitor the cloning process using this command.
clone > SELECT * FROM performance_schema.clone_progress\GAs you can see in the output below, that the cloning has completed DROP DATA and is now working on FILE COPY.
ObservationsJust recently I worked with a customer who moved a 5.6TB database from a Galera Cluster to standard MySQL replication. The data was moved from the source to replicas in two different locations. Timings are detailed below.
MySQL Clone Plugin’s robust performance and efficiency in managing large data transfers, making it an excellent tool for environments requiring quick and reliable data replication.
SummaryThe MySQL Clone Plugin offers several benefits, including:
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Percona Bug Report: October 2024 | 0 | 7.82 | 25-11-2024 |
| 2 | The Percona Community Slack is open — come hang out | 0 | 3.75 | 02-06-2026 |
| 3 | Percona Bug Report: March 2026 | 0 | 7.82 | 03-04-2026 |
| 4 | Meet Percona at KubeCon + CloudNativeCon Europe 2026 | 0 | 6.57 | 25-02-2026 |
| 5 | Meet the Percona Community team | 0 | 6.25 | 07-05-2026 |
| 6 | Backups Using the MySQL Clone Operation | 0 | 4.93 | 28-07-2026 |
| 7 | Pre-FOSDEM & FOSDEM 2026, Community, Databases, and Open Source | 0 | 12.63 | 09-02-2026 |
| 8 | Herding Goats Across Continents: How We Took 100 People From Around the World to Turkey for an Offsite (and Lived to Tell the Tale) | 0 | 5.35 | 06-08-2026 |
| 9 | Group Replication VS Percona XtraDB Cluster: The True Cost of Consistency | 0 | 5.62 | 15-06-2026 |