Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions docs/clone-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ When replicating a large number of transactions, the Clone plugin may be a more

The Clone plugin must be installed on both the donor and the joiner servers at either server startup or at runtime. To install the plugin at runtime, run the following command:

```{.bash data-prompt="mysql>"}
mysql> INSTALL PLUGIN clone SONAME 'mysql_clone.so';
```sql
INSTALL PLUGIN clone SONAME 'mysql_clone.so';
```

Review the INFORMATION_SCHEMA.PLUGINS table or run the `SHOW PLUGINS` command to verify the installation. The following is an example of querying the PLUGINS table.

```{.bash data-prompt="mysql>"}
mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='clone';
```sql
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='clone';
```

The result lists the Clone plugin and the status.
Expand All @@ -31,8 +31,40 @@ The result lists the Clone plugin and the status.

The SQL statement used to clone data depends on if the operation is local or remote. The following code is an example of cloning data from a remote server:

```{.bash data-prompt="mysql>"}
mysql> CLONE INSTANCE FROM `[email protected]:13336` IDENTIFIED BY `user`;
```sql
CLONE INSTANCE FROM `[email protected]:13336` IDENTIFIED BY `user`;
```

Replace the user name, host name, and port number with the settings from the donor server.
Replace the user name, host name, and port number with the settings from the donor server.

## Limitations

The MySQL 8.4 clone plugin enforces several functional and scope limitations that define which instances administrators clone and which data or metadata a clone operation includes.

## Version and instance limits

* The clone plugin only supports cloning within the same MySQL server series, so administrators clone between patch releases such as 8.4.1 and 8.4.13, but not between different major series such as 8.0 and 8.4.

* Each clone operation targets only one MySQL instance, and a single operation never clones multiple instances at once.

## Network and protocol restrictions

* The clone plugin uses the classic MySQL protocol, so the X Protocol port defined by `mysqlx_port` does not serve as the donor port in remote cloning operations with `CLONE INSTANCE` .

* The donor MySQL server instance does not accept clone connections that pass through MySQL Router, so administrators connect directly to the donor.

## Configuration and logs excluded

* The clone plugin preserves the configuration of the recipient server instance, so a clone operation does not copy the donor server configuration or persisted system variable settings.

* The plugin does not copy binary logs, so the recipient does not receive the donor’s binary log files as part of the clone .

## Storage engine behavior

* The clone plugin copies only data stored in the InnoDB storage engine and excludes data that other storage engines store.

* The plugin creates `MyISAM` and `CSV` tables on the recipient as empty tables, even when those tables reside in special schemas such as the `sys` schema .

## Local cloning and tablespaces

* During local cloning, the clone plugin does not support general tablespaces that use an absolute path, because cloning those tablespaces would create a conflicting file that uses the same absolute path on the destination host.