Recipes

Use cases as source -> target pairs, each from two addresses.

Each recipe is one source -> target pair, from two addresses; for each, migkit's own decision engine finds the fastest, exact, consistent way. The hops below are checked against the configuration's own registry, and each capability a recipe leans on against what the code does - a recipe this version cannot do is not on this page.

Verification modes across recipes:

Command / ModeWhen to useGuaranteesComplexity
migkit check <hop>Full battery before cutoverSchema, row counts, auto-increment sequences, and data hash blocksO(all rows) resumable
migkit check <hop> --deepCatalog & semantic auditAudits 20+ silent drift classes: NULL vs empty string, float precision, collation, unvalidated FKs, trigger statusO(1 fused scan)
migkit watch <hop> --verify --deltaActive CDC replicationVerifies primary keys modified in WAL/binlog since last checkpoint; gates cutover readinessO(changed keys)
migkit check <hop> --sampleFast pre-cutover sanity checkTimes a bounded random sample of keys across tables without scanning the full volumeO(budgeted seconds)

A managed PostgreSQL on one cloud to a managed PostgreSQL on another

The same engine on both sides and a different cloud under each. The application keeps writing to the source while the copy runs and its changes follow; the switch waits until the two are proved equal, and a stream back is ready from the moment of it.

PostgreSQL -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  shop:
    goal: cutover
    source: postgres://app@db1.example.com:5432/shop?sslmode=verify-full
    target: postgres://app@db2.example.com:5432/shop?sslmode=verify-full

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit sync shop --mode migrate
migkit sync shop --mode migrate --go
migkit watch shop
migkit move shop --mode cdc --drop --go
migkit check shop

What it leans on, each done by the code for this pair: carrying sequences and auto-increment values; copying table by table, resumably; keeping the target following the source; proving the target has caught up before cutover; carrying users and their grants.

MySQL on servers of your own to a managed MySQL, the cutover run by migkit

The cutover as one timed path: migkit holds the source's writes itself, waits for the stream to pass where the source stands, proves the two equal inside the outage, raises the target's counters, and undoes all of it if the budget passes.

MySQL -> MySQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  orders:
    goal: cutover
    source: mysql://app@10.0.0.5:3306/orders
    target: mysql://app@db2.example.com:3306/orders
    options:
      cutover:
        budget: 30
      limits:
        outage: 30

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit sync orders --mode migrate
migkit sync orders --mode migrate --go
migkit watch orders
migkit move orders --mode cdc --drop --go

What it leans on, each done by the code for this pair: carrying sequences and auto-increment values; copying table by table, resumably; keeping the target following the source; proving the target has caught up before cutover; telling a difference still arriving from one that is wrong.

Oracle to PostgreSQL, with its stored code proved

Two engines: the tables are built on the target in its own types, the rows copied and compared value by value in each engine's rendering, and every view, function, procedure and trigger converted by whichever way proves itself on it - run on both sides in a sandbox and compared, never trusted unrun.

Oracle Database -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  erp:
    goal: copy
    source: oracle://app@db1.example.com:1521/ORCLPDB1/ERP
    target: postgres://app@db2.example.com:5432/erp
    options:
      proof_sandbox: docker

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit move erp --mode full
migkit move erp --mode full --go
migkit check erp

What it leans on, each done by the code for this pair: comparing the data itself; carrying sequences and auto-increment values; copying table by table, resumably.

Stored code carried for this pair: view, function, procedure, trigger - each version, whoever wrote it, run on both sides in the sandbox and compared.

SQL Server to PostgreSQL, followed until the switch

A change of engine with the least downtime: the copy, then the source's changes carried as they happen, and the T-SQL procedures converted and proved beside them.

SQL Server -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  crm:
    goal: cutover
    source: mssql://app@db1.example.com:1433/crm
    target: postgres://app@db2.example.com:5432/crm
    options:
      proof_sandbox: docker

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit sync crm --mode migrate
migkit sync crm --mode migrate --go
migkit watch crm
migkit move crm --mode cdc --drop --go

What it leans on, each done by the code for this pair: copying table by table, resumably; keeping the target following the source; proving the target has caught up before cutover.

Stored code carried for this pair: view, function, procedure, trigger, event - each version, whoever wrote it, run on both sides in the sandbox and compared.

PostgreSQL to a newer major version of PostgreSQL

What the new version removes or changes is checked before anything is written; then the new server is filled and followed - or, where the hop allows it, a copy of the source's pages is upgraded there - and switched to.

PostgreSQL -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  billing:
    goal: upgrade
    source: postgres://app@db1.example.com:5432/billing
    target: postgres://app@db2.example.com:5432/billing

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit assess billing
migkit move billing --mode full+cdc
migkit move billing --mode full+cdc --go
migkit check billing
migkit move billing --mode cdc --drop --go

What it leans on, each done by the code for this pair: comparing server settings; copying table by table, resumably; keeping the target following the source.

MongoDB to MongoDB, with a way back ready at the switch

Collections copied and followed through the source's change stream; at the switch, the stream back to the old source starts, so going back loses nothing written since.

MongoDB -> MongoDB. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  catalog:
    goal: cutover
    source: mongodb://app@db1.example.com:27017/catalog
    target: mongodb://app@db2.example.com:27017/catalog

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit sync catalog --mode migrate
migkit sync catalog --mode migrate --go
migkit watch catalog
migkit move catalog --mode cdc --drop --go

What it leans on, each done by the code for this pair: copying table by table, resumably; keeping the target following the source; proving the target has caught up before cutover; carrying users and their grants.

Two databases proved to hold the same, nothing written to either

After a move someone else made, or between a primary and a copy of it: every table and row that differs named, and nothing written anywhere.

MySQL -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  proof:
    goal: verify
    source: mysql://app@db1.example.com:3306/shop
    target: postgres://app@db2.example.com:5432/shop

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit check proof
migkit check proof --deep

What it leans on, each done by the code for this pair: comparing the data itself.

What a cloud's migration service moved, proved table by table, and only that

A service told to take some databases, schemas and tables - leaving its log tables behind, renaming one, filtering another's rows, taking some columns - is checked against exactly that: include names what it took, exclude what it was told to leave, mapping its renames, filters and columns. A table it never took is neither compared nor called missing, and the verdict says the scope it covers. Given the job's own file where it asks for the source, migkit init writes this hop from it, with every setting of the job that makes a correct move look different said beside it - and the changes it does not carry (mapping.ops) are the contract the check holds each table to. Given the service's own check report as compare_with, the evidence says table by table where its "consistent" falls short: what it called the same that differs, what it skipped, what it never checked.

MySQL -> MySQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  orders-moved:
    goal: verify
    source: mysql://app@db1.example.com:3306/billing,logistics
    target: mysql://app@db2.example.com:3306/billing,logistics_new
    include:
    - billing.*
    - logistics.orders
    - logistics.parcels
    exclude:
    - billing.*_log
    mapping:
      tables:
        logistics.parcels: parcel
      where:
        logistics.parcels: id > 10
      columns:
        logistics.orders:
          keep:
          - id
          - status
          - total
      ops:
        billing.payments:
        - insert
        - update
    options:
      compare_with: service-check-report.json

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit check orders-moved
migkit check orders-moved --deep

What it leans on, each done by the code for this pair: comparing the data itself.

Production to a staging database, as a masked subset

The rows chosen and every row they refer to, masked where the hop says, so every reference in the copy resolves inside it.

PostgreSQL -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  staging:
    goal: subset
    source: postgres://app@db1.example.com:5432/shop
    target: postgres://app@staging.example.com:5432/shop
    options:
      subset:
        start:
          orders: 10%
        children: true
      mask:
      - customers.email

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit move staging --mode full
migkit move staging --mode full --go
migkit check staging

What it leans on, each done by the code for this pair: comparing the data itself; copying table by table, resumably.

A rehearsal on a copy, and the real run forecast from it

The whole path on a copy of the source into a target of its own, every phase timed, so the real hop's plan is forecast from what was measured rather than guessed.

PostgreSQL -> PostgreSQL. The hop, in conf/hops.yaml - two addresses and what it is for; the passwords are kept by migkit init, never in the file:

hops:
  shop-rehearsal:
    goal: rehearse
    source: postgres://app@copy.example.com:5432/shop
    target: postgres://app@db3.example.com:5432/shop
    options:
      rehearses: shop
  shop:
    goal: cutover
    source: postgres://app@db1.example.com:5432/shop
    target: postgres://app@db2.example.com:5432/shop

What migkit init and every dry run say of it:

The commands, in order - one that writes shows its plan until it is given --go:

migkit move shop-rehearsal --mode full+cdc --go
migkit check shop-rehearsal
migkit move shop-rehearsal --mode cdc --drop --go
migkit assess shop-rehearsal

What it leans on, each done by the code for this pair: copying table by table, resumably; keeping the target following the source.