Clone4j

From Commander4j

Clone4j is a database copy utility included with Commander4j. It copies the entire contents of one Commander4j database into another, and supports copying between different database types — for example from SQL Server to MySQL or from MySQL to Oracle.

Clone4j is launched from the Clone4j.exe executable in the Commander4j installation directory. It requires administrator privileges (the launcher requests elevation on Windows).

When to Use Clone4j

Typical uses include:

  • Copying a live production database to a test or development environment
  • Migrating data when moving a site from one database platform to another
  • Creating a full backup copy of the database in a different database instance

Prerequisites

Before running Clone4j:

  • Both the source and destination databases must be defined as hosts in hosts.xml (use Setup4j to configure host connections)
  • Both databases must be on the same schema version — Clone4j will refuse to proceed if the schema versions differ
  • Both databases must have the same number of tables — they must be on identical schema revisions with no partial upgrades applied
  • The destination database will have all its data erased and replaced with the source data

Using Clone4j

  1. Launch Clone4j.exe
  2. The window shows two lists populated from hosts.xml — select the source database on the left and the destination database on the right
  3. Click Clone Database
  4. A confirmation prompt warns that all data in the destination will be erased — confirm to proceed
  5. Clone4j copies every table in sequence, updating a progress bar as it works
  6. On completion, the status bar reports the outcome

The Clone button is only enabled when both a source and a destination have been selected and they are not the same host.

Limitations

  • Clone4j copies data row by row — it is not a structural migration tool. Both databases must already have matching schemas (same schema version, same table count).
  • It is not designed for continuous replication. It is a one-time full copy.
  • Large databases may take several minutes to clone depending on row count and network speed.

See also: Setup4j, Installation, Upgrading