Five minutes, two addresses
Install, two addresses, assess, move, check, cut over.
From two addresses to a cutover. Every command that writes shows its plan first and does nothing until --go.
1. Install, and let migkit fill what this machine lacks
uv tool install migkit
migkit doctor --install
What this machine can do, and whether the configured hops connect.
2. Two addresses
migkit init
MIGKIT_SOURCE=postgres://app@db1.example.com/shop MIGKIT_TARGET=postgres://app@db2.example.com/shop MIGKIT_GOAL=cutover MIGKIT_HOP=shop migkit init
Set up a hop: in a terminal, asks for the two addresses and the passwords, connects, says what it found and what it will do, and writes the hop.
Interactive Hop Config Generator
Select your engines and addresses to generate your conf/hops.yaml snippet and companion commands instantly.
Source Database
Target Database
In a terminal, init asks, and nothing else:
- Where is the data now? An address like postgres://app@db1:5432/shop, or a task file from another tool
- Where should it go? An address like mysql://app@db2/shop
- Keep the passwords in this machine's keychain (k), or read them from environment variables (e)?
Without one it reads the addresses from MIGKIT_SOURCE and MIGKIT_TARGET, and the passwords from MIGKIT_SOURCE_PASSWORD and MIGKIT_TARGET_PASSWORD. It connects, says what it found, proposes what the hop is for, and writes the hop.
3. What each side needs, before anything moves
migkit assess shop
Premigration readiness check: CDC prerequisites, risky tables, encoding, extensions, accounts.
4. Move: the copy, then the changes
migkit move shop --mode full+cdc
migkit move shop --mode full+cdc --go
the copy, then the stream from a position taken before the copy began, so nothing changed during it is lost
5. Check: every row, both sides
migkit check shop
every row compared after the copy (migkit check): equal, or each row that differs named
6. Cut over
migkit move shop --mode cdc --drop --go
the cutover: the stream torn down, the target given back to the application where protect_target kept it, and what else happens on each side is what cutover: says (below); run again once a cutover of the hop has flipped, its point of no return
Without cutover: in the hop's options, the steps around it are the operator's, in the order the cutover section gives; with it, migkit runs them as one timed path that undoes itself.