Skip to content

Field Guide

Data migration tools: copy, replicate or change in place

Pick the tool by the job: moving data once, keeping two stores in step, or changing a live table without blocking it.

Slide: three jobs for data tools: copy once, replicate continuously and change a live table, each with a named tool.

Most data migrations need more than one of these, in order: load the history, keep the new store current, then switch. The dual write and expand and contract pages cover the sequence; this page covers the tools.

The options

Job Tool What it says it does
Keep a second store current from the database log Debezium Change data capture: it reads changes and publishes them as events
Change a live MySQL table gh-ost "a triggerless online schema migration solution for MySQL"
Load into PostgreSQL pgloader "loads data from various sources into PostgreSQL"
A managed migration service AWS DMS "makes it possible to migrate relational databases, data warehouses, NoSQL databases, and other types of data stores"

Change data capture

Instead of the application writing twice, a tool reads the source database's transaction log and replays each change. It sees every write, including batch jobs and scripts nobody remembers. The price is another piece of infrastructure and a copy that lags slightly.

Online schema change

gh-ost describes itself as "testable" with "pausability, dynamic control/reconfiguration, auditing, and many operational perks." It builds a copy of the table, applies the change there and swaps it in, so the table stays usable during the work.

Bulk loading

pgloader reads files, including CSV and fixed formats, and databases including SQLite, MySQL, MS SQL Server, PostgreSQL and Redshift, and "manages errors by filling a pair of reject.dat and reject.log files." Read those files. Rejected rows are the migration's real test results.

When not to use it

  • An outage of an hour is acceptable and the data is small. Dump, restore and verify.
  • The platform already offers it. A managed database's own copy or replica feature may be enough.
  • Nobody will operate the tool. A running pipeline needs monitoring.
  • The data needs rewriting by business rules. A tool moves rows; your code decides what they mean.

Checklist

  • The history is loaded and rerunnable.
  • The new store is kept current, and lag is measured.
  • Row counts, totals and samples are compared, as in verification.
  • Rejected rows have an owner.
  • There is a date to turn the tool off.

Sources

  1. Debezium documentation - features - change data capture from database logs
  2. github/gh-ost - README - triggerless online schema migration for MySQL
  3. pgloader documentation - Introduction - loading data into PostgreSQL from files and other databases
  4. What is AWS Database Migration Service? - AWS documentation - a managed service for migrating databases

Last updated November 29, 2026.