Docs / Migration Guide

Migration Guide

This guide covers all paths to Maree-DB - from a simple connection-string change to a full Oracle migration.

Part 1 - Zero-Migration Switch

For MySQL, PostgreSQL, and Redis: just change your connection string. Your application doesn't know the difference. (SQL Server TDS connectivity is in final development - migrate your data today with the export/import path below.)

MySQL → Maree-DB

# Before mysql -h mysql-server -P 3306 -u myapp -p mydb # After mysql -h mareedb-server -P 3306 -u myapp -p mydb # Your app doesn't know the difference.

PostgreSQL → Maree-DB

# Before: postgresql://user:pass@pg-server:5432/mydb # After: postgresql://user:pass@mareedb-server:5432/mydb # No other changes required.

SQL Server → Maree-DB

// SQL Server TDS connectivity is in final development. // Today: export from SQL Server (bcp/CSV), import via the REST bulk // loader or the maree CLI, and connect over the PostgreSQL or MySQL // wire protocol. The connection-string switch lands with TDS.

Redis → Maree-DB

# Before: redis://redis-server:6379 # After: redis://mareedb-server:6379 # All RESP3 commands work as-is.

Part 2 - Oracle Migration

Prerequisites

  • Maree-DB Enterprise installed and running
  • Oracle DB host accessible from the Maree-DB server
  • Oracle DB credentials with SELECT on all tables

Step 1: Free Compatibility Assessment

Before starting, run a dry assessment to understand what will translate automatically and what needs review:

maree-db-server migrate \ --source oracle://user:pass@oracle-host/ORCL \ --dry-run \ --report assessment.html

Step 2: Execute Migration

maree-db-server migrate \ --source oracle://user:pass@oracle-host/ORCL \ --target mareedb://admin:pass@localhost/mydb \ --translate-plsql \ --report migration.html

Step 3: Validate

maree-db-server migrate --validate \ --source oracle://user:pass@oracle-host/ORCL \ --target mareedb://admin:pass@localhost/mydb

Rollback

If you need to revert, your Oracle database is untouched throughout the migration process. The migration only reads from Oracle; it never writes to it.

Part 3 - MongoDB Migration

# One command - all collections migrated automatically maree-db-server migrate \ --source mongodb://user:pass@mongo-host/mydb \ --target mareedb://admin:pass@localhost/mydb # Validate row counts and document integrity maree-db-server migrate --validate \ --source mongodb://user:pass@mongo-host/mydb

BSON documents become JSONB columns. All $lookup aggregations translate to SQL JOINs.

Part 4 - Multi-Source Consolidation

# Migrate from multiple sources simultaneously maree-db-server migrate \ --source mysql://prod-db/myapp \ --source redis://cache-server:6379 \ --source mongodb://doc-server/content \ --target mareedb://admin:pass@localhost # Run dry-run first to see the merge plan maree-db-server migrate \ --source mysql://prod-db/myapp \ --source redis://cache-server:6379 \ --dry-run --report consolidation-plan.html

Part 5 - Live Migration (Zero Downtime)

Use --live to migrate with no downtime. Maree-DB replicates changes in real-time and you cut over when lag reaches zero.

# Start live migration maree-db-server migrate \ --source mysql://prod-db/myapp \ --live # Monitor replication lag maree-db-cli migrate --status # Lag output: # Source rows: 12,847,923 Replicated: 12,847,923 Lag: 3ms # Source rows: 12,847,951 Replicated: 12,847,951 Lag: 0ms READY # Execute cutover when lag = 0ms maree-db-cli migrate --cutover

Part 6 - cPanel Migration

For cPanel hosting environments, the Maree-DB cPanel plugin takes over the MySQL socket transparently. All sites continue working.

# Install the cPanel plugin (WHM) sudo /usr/local/cpanel/3rdparty/bin/installplugin maree-db-cpanel-plugin.tar.gz # The plugin: # 1. Installs Maree-DB alongside MySQL # 2. Migrates all databases automatically # 3. Redirects the MySQL socket to Maree-DB # 4. Every WordPress site works without any changes