MOLT Replicator Installation

On this page Carat arrow pointing down

Prerequisites

Supported databases

MOLT Replicator supports the following source and target databases:

  • PostgreSQL 11-16
  • MySQL 5.7, 8.0 and later
  • Oracle Database 19c (Enterprise Edition) and 21c (Express Edition)
  • CockroachDB (all currently supported versions)

Database configuration

The source database must be configured for replication:

Database Configuration Requirements Details
PostgreSQL source
  • Enable logical replication by setting wal_level = logical.
Configure PostgreSQL for replication
MySQL source
  • Enable global transaction identifiers (GTID) and configure binary logging. Set binlog-row-metadata or binlog-row-image to full.
  • Configure sufficient binlog retention for migration duration.
Configure MySQL for replication
Oracle source Configure Oracle for replication
CockroachDB source (failback)
  • Enable rangefeeds (kv.rangefeed.enabled = true) (CockroachDB self-hosted clusters only).
Configure CockroachDB for replication

User permissions

The SQL user running MOLT Replicator requires specific privileges on both the source and target databases:

Database Required Privileges Details
PostgreSQL source
  • SUPERUSER role (recommended), or the following granular permissions:
  • CREATE and SELECT on database and tables to replicate.
  • Table ownership for adding tables to publications.
  • LOGIN and REPLICATION privileges to create replication slots and access replication data.
Create PostgreSQL migration user
MySQL source
  • SELECT on tables to replicate.
  • REPLICATION SLAVE and REPLICATION CLIENT privileges for binlog access.
  • For --fetchMetadata, either SELECT on the source database or PROCESS globally.
Create MySQL migration user
Oracle source
  • SELECT, INSERT, UPDATE on REPLICATOR_SENTINEL table.
  • SELECT on V$ views (V$LOG, V$LOGFILE, V$LOGMNR_CONTENTS, V$ARCHIVED_LOG, V$LOG_HISTORY).
  • SELECT on SYS.V$LOGMNR_* views (SYS.V$LOGMNR_DICTIONARY, SYS.V$LOGMNR_LOGS, SYS.V$LOGMNR_PARAMETERS, SYS.V$LOGMNR_SESSION).
  • LOGMINING privilege.
  • EXECUTE on DBMS_LOGMNR.
  • For Oracle Multitenant, the user must be a common user (prefixed with C##) with privileges granted on both CDB and PDB.
Create Oracle migration user

Create sentinel table

Grant LogMiner privileges
CockroachDB target (forward replication)
  • ALL on target database.
  • CREATE on schema.
  • SELECT, INSERT, UPDATE, DELETE on target tables.
  • CREATEDB privilege for creating staging schema.
Create CockroachDB user
PostgreSQL, MySQL, or Oracle target (failback)
  • SELECT, INSERT, UPDATE on tables to fail back to.
  • For Oracle, FLASHBACK is also required.
Grant PostgreSQL user permissions

Grant MySQL user permissions

Grant Oracle user permissions

Installation

To install MOLT, download the binary that matches your architecture and source database:

Operating System Architecture PostgreSQL/MySQL Oracle
Windows AMD 64-bit Download N/A
ARM 64-bit Download N/A
Linux AMD 64-bit Download Download
ARM 64-bit Download N/A
Mac AMD 64-bit Download Download
ARM 64-bit Download Download

The following binaries are included:

  • molt
  • replicator
Tip:

For ease of use, keep both molt and replicator in your current working directory.

To display the current version of each binary, run molt --version and replicator --version.

Note:

molt is bundled with the latest replicator version available at the time of the MOLT release. This means that the MOLT download always contains the latest released version of MOLT Replicator. To verify that the molt and replicator versions match, run molt --version and replicator --version.

For previous binaries, refer to the MOLT version manifest. For release details, refer to the MOLT changelog.

Docker images

MOLT Fetch

Docker multi-platform images containing both the AMD and ARM molt and replicator binaries are available. To pull the latest image for PostgreSQL and MySQL:

icon/buttons/copy
docker pull cockroachdb/molt

To pull a specific version (for example, 1.1.3):

icon/buttons/copy
docker pull cockroachdb/molt:1.1.3

To pull the latest image for Oracle (note that only linux/amd64 is supported):

icon/buttons/copy
docker pull cockroachdb/molt:oracle-latest

MOLT Replicator

Docker images for MOLT Replicator are also available as a standalone binary:

icon/buttons/copy
docker pull cockroachdb/replicator

To pull a specific version (for example, v1.1.1):

icon/buttons/copy
docker pull cockroachdb/replicator:v1.1.1

Docker usage

Performance

MOLT Fetch, Verify, and Replicator are likely to run more slowly in a Docker container than on a local machine. To improve performance, increase the memory or compute resources, or both, on your Docker container.

Local connection strings

When testing locally, specify the host as follows:

  • For macOS, use host.docker.internal. For example:

    --source 'postgres://postgres:postgres@host.docker.internal:5432/migration_db?sslmode=disable'
    --target "postgres://root@host.docker.internal:26257/defaultdb?sslmode=disable"
    
  • For Linux and Windows, use 172.17.0.1. For example:

    --source 'postgres://postgres:postgres@172.17.0.1:5432/migration_db?sslmode=disable'
    --target "postgres://root@172.17.0.1:26257/defaultdb?sslmode=disable"
    

See also

×