MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

15.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']
    [REQUIRE [NO] SSL]
}

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 7.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 7.6.7.2, “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 7.6.7.3, “Cloning Remote Data”.