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.
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 |
|
Create PostgreSQL migration user |
| MySQL source |
|
Create MySQL migration user |
| Oracle source |
|
Create Oracle migration user |
| CockroachDB target |
|
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:
moltreplicator
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.
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:
docker pull cockroachdb/molt
To pull a specific version (for example, 1.1.3):
docker pull cockroachdb/molt:1.1.3
To pull the latest image for Oracle (note that only linux/amd64 is supported):
docker pull cockroachdb/molt:oracle-latest
MOLT Replicator
Docker images for MOLT Replicator are also available as a standalone binary:
docker pull cockroachdb/replicator
To pull a specific version (for example, v1.1.1):
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"