A remote cloning operation involves a local MySQL server instance (the “recipient” ) where the cloning operation is initiated, and a remote MySQL server instance (the “donor” ) where the source data is located. When a remote cloning operation is initiated on the recipient, cloned data is transferred over the network from the donor to the recipient. By default, a remote cloning operation removes the data in the recipient data directory and replaces it with the cloned data. Optionally, you can clone data to a different directory on the recipient to avoid removing existing data. 

There is no difference with respect to data that is cloned by a local cloning operation as compared to a remote cloning operation. Both operations clone the same data. 

The clone plugin supports replication. In addition to cloning data, a cloning operation extracts and transfers replication coordinates from the donor and applies them on the recipient, which enables using the clone plugin for provisioning Group Replication members and replicas. Using the clone plugin for provisioning is considerably faster and more efficient than replicating a large number of transactions (see Section 5.6.7.6, “Cloning for Replication” ). Group Replication members can also be configured to use the clone plugin as an alternative method of recovery, so that members automatically choose the most efficient way to retrieve group data from seed members. For more information, see Section 18.5.3.2, “Cloning for Distributed Recovery” . 

The clone plugin supports cloning of encrypted and page-compressed data. See Section 5.6.7.4, “Cloning Encrypted Data” , and Section 5.6.7.5, “Cloning Compressed Data” . 

The clone plugin must be installed before you can use it. For installation instructions, see Section 5.6.7.1, “Installing the Clone Plugin” . For cloning instructions, see Section 5.6.7.2, “Cloning Data Locally” , and Section 5.6.7.3, “Cloning Remote Data” . 

Performance Schema tables and instrumentation are provided for monitoring cloning operations. See Section 5.6.7.9, “Monitoring Cloning Operations” . 

## 5.6.7.1 Installing the Clone Plugin 

This section describes how to install and configure the clone plugin. For remote cloning operations, the clone plugin must be installed on the donor and recipient MySQL server instances. 

For general information about installing or uninstalling plugins, see Section 5.6.1, “Installing and Uninstalling Plugins” . 

To be usable by the server, the plugin library file must be located in the MySQL plugin directory (the directory named by the plugin_dir  system variable). If necessary, set the value of plugin_dir  at server startup to tell the server the plugin directory location. 

The plugin library file base name is mysql_clone.so . The file name suffix differs by platform (for example, .so  for Unix and Unix-like systems, .dll  for Windows). 

To load the plugin at server startup, use the --plugin-load-add  option to name the library file that contains it. With this plugin-loading method, the option must be given each time the server starts. For example, put these lines in your my.cnf  file, adjusting the .so  suffix for your platform as necessary: 

[mysqld] plugin-load-add=mysql_clone.so 

After modifying my.cnf , restart the server to cause the new settings to take effect. 

## Note 

The --plugin-load-add  option cannot be used to load the clone plugin when restarting the server during an upgrade from a previous MySQL version. For 

