MOLT Fetch supports various migration flows using MOLT Fetch modes.
Migration flow | Mode | Description | Best for |
---|---|---|---|
Bulk load | --mode data-load |
Perform a one-time bulk load of source data into CockroachDB. | Testing, migrations with planned downtime |
Data load and replication | --mode data-load-and-replication |
Load source data, then replicate subsequent changes continuously. | Minimal downtime migrations |
Data load then replication-only | --mode data-load , then --mode replication-only |
Load source data first, then start replication in a separate task. | Minimal downtime migrations |
Resume replication | --mode replication-only |
Resume replication from a checkpoint after interruption. | Resuming interrupted migrations, post-load sync |
Failback | --mode failback |
Replicate changes from CockroachDB back to the source database. | Rollback scenarios |
Bulk load
For migrations that tolerate downtime, use data-load
mode to perform a one-time bulk load of source data into CockroachDB. Refer to Bulk Load.
Migrations with minimal downtime
To minimize downtime during migration, MOLT Fetch supports replication streams that sync ongoing changes from the source database to CockroachDB. Instead of performing the entire data load during a planned downtime window, you can perform an initial load followed by continuous replication. Writes are only briefly paused to allow replication to drain before final cutover. The length of the pause depends on the volume of write traffic and the amount of replication lag between the source and CockroachDB.
- Use
data-load-and-replication
mode to perform both steps in one task. Refer to Load and Replicate. - Use
data-load
followed byreplication-only
to perform the steps separately. Refer to Load and Replicate Separately.
Recovery and rollback strategies
If the migration is interrupted or you need to abort cutover, MOLT Fetch supports safe recovery flows:
- Use
replication-only
to resume a previously interrupted replication stream. Refer to Resume Replication. - Use
failback
to reverse the migration, syncing changes from CockroachDB back to the original source. This ensures data consistency on the source so that you can retry later. Refer to Migration Failback.