Data Management Service (DMS) provides the Database Clone feature, allowing you to copy data at the database level. This topic describes how to use the Database Clone feature.
- Create a full database backup.
- Initialize databases deployed across multiple environments, such as online and offline environments.
- Copy data from a database in an online environment to a database in an offline environment for data processing and analytics.
- Both the source and destination databases must be MySQL databases.
- The control mode of the instances to which the source and destination databases belong must be set as Flexible Management. For more information about control modes, see Control modes.
- Log on to the DMS console.
- In the top navigation bar, choose Data Plans > Database Clone.
- On the Database Clone page, click Database Clone in the upper-right corner.
Fill out and submit the ticket.
Parameter Description Task Name The name of the task to clone a database. Source database (Only support MySQL) The source database that you want to clone. The source database must be a MySQL database. You can select a database from the drop-down list, or enter a keyword and select a database from the dynamically matched result. Target database (Only support MySQL) The destination database to which you want to write the data copied from the source database. The destination database must be a MySQL database. You can select a database from the drop-down list, or enter a keyword and select a database from the dynamically matched result. Select source table The table that you want to clone from the source database. You can specify multiple tables. Duplicate objects The operation to perform when the destination database has an object, such as a table, with the same name as the source object that you have copied from the source database. Valid values:
- Skip duplicate name object: Skip cloning the source object.
- Overwrite duplicate name object (warning: the structure and data of the target object will be replaced): Overwrite the object in the destination database with that in the source database. The schema and data of the object in the destination database will be replaced by the schema and data of the source object.
Migration Objects The programmable objects that you want to clone. In addition to tables, you can synchronously clone programmable objects from a source database to a destination database. Valid values:
Time options The time to start the task. You can specify the task to run immediately after the ticket is approved or at a specified time.
- Click Submit and wait for the ticket to be approved.
After the ticket is approved, the task will automatically start. Wait until the task is completed.