Skip to main content

MySQL Database Server Cloning

XLServer provides the ability to create cloned MySQL database servers for development, QA, troubleshooting, and staging purposes.
Two types of clone are supported:

  • Virtual Clone: Lightweight clone using snapshots (fast creation, minimal disk usage).
  • Physical Clone: Full duplication of the live database server (block-to-block copy).

From the MySQL Server detail page, you can create a virtual or physical clone directly from the latest snapshot.
Alternatively, from the Snapshot detail page, you can initiate a clone from a specific snapshot.


⚙️ Prerequisites

To clone MySQL servers with XLServer:

  • XLServer must have SSH access to target host.
  • Target environment must be already added to XLServer.
  • Target environment must be compatible with source environment:
    • Same Linux architecture.
    • Same distribution and major version.
  • Target MySQL binary must be equal to or higher than source binary version.
  • MySQL hosts must have NFS client installed.

🌀 Clone Types

Virtual Clone

  • Created from snapshots, without duplicating data.
  • Very fast (≈30s) creation.
  • Minimal disk usage.
  • Can be reset, shared, converted to physical, started or stopped.

Physical Clone

  • Full copy of database server.
  • Takes longer to provision (size-dependent).
  • Requires as much disk space as the source server.
  • Managed as an independent MySQL instance.

🌐 Create MySQL Virtual Clone

  1. Open MySQL database server detail page.
    MySQL detail

  2. Click Actions > Create Virtual Clone → Confirm.

  3. The Cloning Wizard is displayed.

  4. Select the Target Environment → Next.
    Select environment

  5. On Database Configuration page, enter:

    • Port Number (target port for MySQL).
    • Mount Base (NFS mount point).
    • Parallel threads (for restore parallelism, or SQL execution in parallel).
    • Post Script Path (optional SQL script executed after clone creation).
      DB Config

    Click Next.

  6. In Parameters page, customize MySQL clone parameters.
    Parameters are inherited from template (if attached) or source server.
    Parameters

    Click Next.

  7. Review Summary page.
    Summary

  8. Click FINISH to validate.

  9. Track job execution in Job list.
    Job progress

    ⚡ Virtual clones are created in less than 30 seconds (no masking or upgrade applied).

  10. Access the Virtual Clone detail page.
    Clone detail
    Virtual clone uses very little disk compared to source.


📋 MySQL Virtual Clone Management

Configuration Parameters

The left panel displays configuration parameters:

ParameterDescription
ProjectProject owning the clone
EnvironmentTarget environment
VendorAlways MYSQL
Repositorymysqld binary path
VersionMySQL server version
Platform32-bit or 64-bit
PortConnection port
SocketConnection socket
DatadirData directory
Server IDMySQL server identifier
JDBC ServiceJDBC connection string
Startup TimeoutTimeout before throwing startup error
Source DatabaseName of source database server
Mount BaseNFS mount point
Database TypeClone Database
DB UserClone DB user
Specific Post Script ExecutionStatus (none, failed, success)
Generic Post Script ExecutionStatus (none, failed, success)
DatamaskingStatus (none, failed, success)
Creation TimeTimestamp of clone creation
Created ByUser who created the clone

Parameters


Dashboard Cards

Right side displays:

  • Disk Usage
  • Disk Usage Ratio vs live DB
  • Clone Age
  • Snapshot Version (increments on reset)

Cards


Parent Container

Displays parent snapshot lineage:

  • Last Checkpoint LSN
  • Last Change Time
  • Snapshot creation time
  • Database schemas list

Parent container


🔑 Change Credentials

  1. Click pencil icon near DB User.
  2. Enter new username/password.
  3. Click VALIDATE.
    Change credentials

⚡ Actions on MySQL Virtual Clones

Available in Actions menu:
Actions list


⏹ Stop

  • Stops clone server.
  • MySQL process is shutdown.
  • NFS unmounted from host.
    Stop

▶️ Start

  • Starts clone server.
  • NFS mounted and MySQL started.
    Start

🔄 Reset

  • Resets clone to initial state.
  • Changes since creation are lost.
  • Snapshot version increments.
    Reset

🤝 Share

  • Creates another clone in same/new environment.
  • Very fast (no masking or post-script executed).

Steps:

  1. Actions > Share → Confirm.
    Confirm
  2. Select target environment.
    Select env
  3. Enter configuration:
    • Port Number
    • Mount Base
    • Parallel Threads
      Config
  4. Review summary → Finish.
    Summary
  5. Track job progress.
    Progress
  6. Shared clone created successfully.
    Clone list

💽 Convert to Physical

  • Converts virtual clone to physical (copies DB files locally).
  • Requires same disk space as source.

Steps:

  1. Actions > Convert to Physical → Confirm.
    Confirm
  2. Enter Local Directory path.
    Dirs
  3. Review summary → Finish.
    Summary
  4. Track job execution.
    Progress
  5. Converted clone is tagged as Physical Clone.
    List
Performance Optimization

The database duplication script automatically detects if the parallel command is available on your system:

  • With parallel installed: Database files will be copied concurrently based on the parallel degree specified.
  • Without parallel: Files will be copied sequentially (one by one), which takes considerably longer.

🗑 Delete

  • Deletes clone metadata from XLServer.
  • Confirmation required.
    Delete

🏗️ Create MySQL Physical Clone

  1. Open MySQL database detail page.
    Detail

  2. Click Actions > Create Physical Clone → Confirm.

  3. Cloning wizard appears.

  4. Select Target Environment → Next.
    Select env

  5. On Database Configuration page, enter:

    • Port Number
    • Mount Base
    • Post Script Path (optional)
    • Parallel threads
      Config
  6. In Parameters page, adjust parameters.
    Parameters

  7. Review Summary page.
    Summary

  8. Click FINISH.

  9. Track job execution in Job list.
    Progress

    Physical clones may take significant time depending on live DB size.

  10. Metadata is visible in detail page.

    Physical clones have no container in XLServer.

Performance Optimization

The database duplication script automatically detects if the parallel command is available on your system:

  • With parallel installed: Database files will be copied concurrently based on the parallel degree specified.
  • Without parallel: Files will be copied sequentially (one by one), which takes considerably longer.

🗑 Delete Physical Clone

  • Actions > Delete.
  • Removes metadata from XLServer only.
  • Running DB continues independently on target host.
    Delete

✅ Summary

  • Virtual Clones: Fast, lightweight, minimal disk space, can be reset/shared/converted.
  • Physical Clones: Full independent MySQL servers, resource-intensive, slower to create.
  • Both types provide safe environments for testing and troubleshooting without touching production.