All Products
Search
Document Center

Database clone

Last Updated: Jun 29, 2020

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.

Scenarios

  • 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.

Prerequisites

  • 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.

Procedure

  1. Log on to the DMS console.
  2. In the top navigation bar, choose Data Plans > Database Clone.
  3. On the Database Clone page, click Database Clone in the upper-right corner.
    new1
  4. Fill out and submit the ticket.
    new2

    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:
    • View
    • Procedure
    • Function
    • Trigger
    • Event
    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.
  5. 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.