Skip to main content

MariaDB Database Server Cloning

XLServer provides advanced cloning capabilities for MariaDB database servers, allowing teams to quickly provision test, QA, development, and troubleshooting environments.

Two types of clones are supported:

  • Virtual Clone: Lightweight, snapshot-based, minimal storage, very fast.
  • Physical Clone: Full database duplication, independent instance, slower to provision.

From XLServer, a virtual clone can be converted into a physical clone at any time.


⚙️ Prerequisites

Before creating MariaDB clones, ensure:

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

🌀 Clone Types

Virtual Clone

  • Created using snapshot technology.
  • Very fast (typically < 30s).
  • Requires minimal disk space.
  • Supports reset, share, convert-to-physical, start, stop.

Physical Clone

  • Full copy of source MariaDB database server.
  • Requires disk space equal to the source.
  • Slower to provision (size-dependent).
  • Behaves as a completely independent instance.

🌐 Create MariaDB Virtual Clone

  1. Open MariaDB server detail page.
    Server detail

  2. Click Actions > Create Virtual Clone → Confirm.

  3. The Cloning Wizard is displayed.

  4. Select the Target Environment → Next.
    Select env

  5. On Database Configuration page, provide:

    • Port Number
    • Mount Base (NFS mount point)
    • Parallel threads (for restore or SQL execution parallelism)
    • Post Script Path (optional SQL script after clone creation)
      Configuration

    Click Next.

  6. On Parameters page, adjust clone parameters if necessary.
    Values are inherited from attached template or source DB.
    Parameters

    Click Next.

  7. Review the Summary page.
    Summary

  8. Click FINISH.

  9. Track job execution in the Job list.
    Job progress

  10. Open the Virtual Clone detail page.
    Detail

    ⚡ Virtual clones consume very little disk space compared to the source server.


📋 MariaDB Virtual Clone Management

Configuration Parameters

Left side panel displays configuration details:

ParameterDescription
ProjectProject owning the clone
EnvironmentTarget environment
VendorMARIADB
Repositorymariadbd binary path
VersionMariaDB server version
Platform32-bit or 64-bit
PortConnection port
SocketConnection socket
DatadirData directory
Server IDMariaDB server identifier
JDBC ServiceJDBC connection string
Startup TimeoutTimeout before throwing startup error
Source DatabaseName of source DB 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

The right side displays:

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

Cards


Parent Container

Information about snapshot lineage:

  • Last Checkpoint LSN
  • Last Change Time
  • Parent snapshot creation time
  • List of parent schemas

Parent container


🔑 Changing Database Credentials

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

⚡ Actions on MariaDB Virtual Clones

Actions available under Actions menu:
Actions list


⏹ Stop

  • Shuts down MariaDB process.
  • Unmounts NFS from host.
    Stop

▶️ Start

  • Mounts NFS and starts MariaDB process.
    Start

🔄 Reset

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

🤝 Share

  • Creates another clone on same/new environment.
  • Very fast (no masking/post-scripts executed).

Steps:

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

💽 Convert to Physical

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

Steps:

  1. Actions > Convert to Physical → Confirm.
    Confirm
  2. Enter Local Directory on target host.
    Directories
  3. Review Summary → Finish.
    Summary
  4. Track job progress.
    Progress
  5. Converted clone is tagged as Physical.
    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 virtual clone metadata from XLServer.
  • Confirmation required.
    Delete

🏗️ Create MariaDB Physical Clone

  1. Open MariaDB 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.
    Progress

    Physical clones take time depending on source DB size.

  10. Metadata appears 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 clone metadata from XLServer only.
  • Running database continues independently.
    Delete

✅ Summary

  • Virtual Clones: Quick, lightweight, minimal storage, easily reset or shared.
  • Physical Clones: Full, independent MariaDB servers, resource-intensive, slower to provision.
  • Both types provide safe, isolated environments without impacting production.