MOLT Fetch Installation

On this page Carat arrow pointing down

Prerequisites

Supported databases

The following source databases are supported:

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

Database configuration

Ensure that the source and target schemas are identical, unless you enable automatic schema creation with the drop-on-target-and-recreate option. If you are creating the target schema manually, review the behaviors in Mismatch handling.

Note:

MOLT Fetch does not support migrating sequences. If your source database contains sequences, refer to the guidance on indexing with sequential keys. If a sequential key is necessary in your CockroachDB table, you must create it manually. After using MOLT Fetch to load the data onto the target, but before cutover, make sure to update each sequence's current value using setval() so that new inserts continue from the correct point.

If you plan to use cloud storage for the data migration, follow Cloud storage security best practices.

User permissions

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

Database Required Privileges Details
PostgreSQL source
  • CONNECT on database.
  • USAGE on schema.
  • SELECT on tables to migrate.
Create PostgreSQL migration user
MySQL source
  • SELECT on tables to migrate.
Create MySQL migration user
Oracle source
  • CONNECT and CREATE SESSION.
  • SELECT and FLASHBACK on tables to migrate.
  • SELECT on metadata views (ALL_USERS, DBA_USERS, DBA_OBJECTS, DBA_SYNONYMS, DBA_TABLES).
Create Oracle migration user
CockroachDB target
  • ALL on target database.
  • CREATE on schema.
  • SELECT, INSERT, UPDATE, DELETE on target tables.
  • For IMPORT INTO: SELECT, INSERT, DROP on target tables. Optionally EXTERNALIOIMPLICITACCESS for implicit cloud storage authentication.
  • For COPY FROM: admin role.
Create CockroachDB user

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

×