MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

13.7.5 CLONE Statement

CLONE clone_action

clone_action: {
    LOCAL DATA DIRECTORY [=] 'clone_dir';
  | INSTANCE FROM 'user'@'host':port
    IDENTIFIED BY 'password'
    [DATA DIRECTORY [=] 'clone_dir']

The CLONE statement is used to clone data locally or from a remote MySQL server instance. To use CLONE syntax, the clone plugin must be installed. See Section 5.6.7, “The Clone Plugin”.

CLONE LOCAL DATA DIRECTORY syntax clones data from the local MySQL data directory to a directory on the same server or node where the MySQL server instance runs. The 'clone_dir' directory is the full path of the local directory that data is cloned to. An absolute path is required. The specified directory must not exist, but the specified path must be an existent path. The MySQL server requires the necessary write access to create the specified directory. For more information, see Section, “Cloning Data Locally”.

CLONE INSTANCE syntax clones data from a remote MySQL server instance (the donor) and transfers it to the MySQL instance where the cloning operation was initiated (the recipient).

For additional information about cloning data from a remote MySQL server instance, see Section, “Cloning Remote Data”.