### 5.6.7 The Clone Plugin

[5.6.7.1 Installing the Clone Plugin](clone-plugin-installation.html)
[5.6.7.2 Cloning Data Locally](clone-plugin-local.html)
[5.6.7.3 Cloning Remote Data](clone-plugin-remote.html)
[5.6.7.4 Cloning and Concurrent DDL](clone-plugin-concurrent-ddl.html)
[5.6.7.5 Cloning Encrypted Data](clone-plugin-encrypted-data.html)
[5.6.7.6 Cloning Compressed Data](clone-plugin-compressed-data.html)
[5.6.7.7 Cloning for Replication](clone-plugin-replication.html)
[5.6.7.8 Directories and Files Created During a Cloning Operation](clone-plugin-directories.html)
[5.6.7.9 Remote Cloning Operation Failure Handling](clone-plugin-failure-handling.html)
[5.6.7.10 Monitoring Cloning Operations](clone-plugin-monitoring.html)
[5.6.7.11 Stopping a Cloning Operation](clone-plugin-stop.html)
[5.6.7.12 Clone System Variable Reference](clone-plugin-option-variable-reference.html)
[5.6.7.13 Clone System Variables](clone-plugin-options-variables.html)
[5.6.7.14 Clone Plugin Limitations](clone-plugin-limitations.html)

[]()[]()[]()

 The clone plugin, introduced in MySQL 8.0.17, permits cloning data locally or from a remote MySQL server instance. Cloned data is a physical snapshot of data stored in `InnoDB` that includes schemas, tables, tablespaces, and data dictionary metadata. The cloned data comprises a fully functional data directory, which permits using the clone plugin for MySQL server provisioning.

[]()

**Figure 5.1 Local Cloning Operation**

<img alt="The CLONE LOCAL statement clones the data directory on a local MySQL Server instance to another local directory, which is referred to as the clone directory." src="images/clone-local.png" height="324" width="307" />

 A local cloning operation clones data from the MySQL server instance where the cloning operation is initiated to a directory on the same server or node where MySQL server instance runs.

[]()

**Figure 5.2 Remote Cloning Operation**

<img alt="The CLONE INSTANCE statement issued from the local recipient MySQL Server instance clones the data directory from the remote donor MySQL server instance to the data directory on the local recipient MySQL Server instance." src="images/clone-remote.png" height="297" width="307" />

 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 existing user-created data (schemas, tables, tablespaces) and binary logs from the recipient data directory before cloning data from the donor. Optionally, you can clone data to a different directory on the recipient to avoid removing data from the current recipient data directory.

 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 set of 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.7, “Cloning for Replication”](clone-plugin-replication.html)). 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.4.2, “Cloning for Distributed Recovery”](group-replication-cloning.html).

 The clone plugin supports cloning of encrypted and page-compressed data. See [Section 5.6.7.5, “Cloning Encrypted Data”](clone-plugin-encrypted-data.html), and [Section 5.6.7.6, “Cloning Compressed Data”](clone-plugin-compressed-data.html).

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

 Performance Schema tables and instrumentation are provided for monitoring cloning operations. See [Section 5.6.7.10, “Monitoring Cloning Operations”](clone-plugin-monitoring.html).

