FREE2026 Database Management Software Comparison|Independent, data-backed — no sales callGet the PDF →

Spotsaas logo
Free PDF · Database Management

Database Migration Runbook

A step-by-step runbook for migrating a database — schema conversion, data load, validation, cutover, and rollback — whether you're moving between engines, versions, or from self-managed to a cloud-managed platform.

  • Migration Phases
  • Pre-Cutover Gate
  • A ready-to-use, editable resource
★★★★★Trusted by 3,000+ buyers· built from 88 database management software tools· independent
PDF · FreeDatabase Migration Runbook

Where should we send it? Free · arrives in seconds · no spam.

We email it to you — one-click unsubscribe anytime.

  1. 1Tell us where to send it

    Your name and work email — nothing more.

  2. 2Check your inbox

    Your guide arrives in seconds, not days.

  3. 3Use it with your team

    Editable and ready to share — make it your own.

A peek inside

See exactly what you're getting

Free PDF
Spotsaas · 2026
Database Migration Runbook
Migration Phases
Pre-Cutover Gate
A ready-to-use, editable resource
Get the guide

What it is

The Database Migration Runbook is a step-by-step operational document that walks a team through moving a production database from one place to another — between engines (say MySQL to PostgreSQL), between major versions, or from a self-managed server to a cloud-managed platform like Amazon Aurora. It is structured as five sequential phases: assess and plan, convert the schema, load the data, validate, and cut over. Each phase carries its own checklist of concrete tasks, so the migration runs as a script you execute rather than a set of decisions you improvise mid-window.

What separates a runbook from a vague migration plan is that it pre-decides the hard parts before the clock is running. It forces you to choose a strategy up front — a big-bang downtime window versus a CDC-based near-zero-downtime cutover using binlog, WAL, or oplog replication — and it sets a hard rollback deadline so nobody is debating whether to abort at 3am. The document is engine-agnostic in structure but specific in practice: it expects you to resolve type mappings, collation differences, and sequence-versus-auto-increment quirks as real work, not footnotes.

Crucially, the runbook treats validation and rollback as first-class phases rather than afterthoughts. Before any traffic moves, a Pre-Cutover Gate requires a validated restorable backup, passing row-count and checksum reconciliation, green application smoke tests, confirmed zero replication lag, and a tested rollback procedure with a named owner. That gate is the difference between a migration you can trust and one you are merely hoping works.

What it's used for

Teams reach for a migration runbook whenever the cost of getting a database move wrong is high — which is nearly always, because the database holds the state everything else depends on. It is used to turn a risky, one-shot event into a rehearsed, reversible procedure. The concrete jobs it does:

  • Planning an engine or version change — inventorying the source schema, data volume, and incompatible types, extensions, or stored procedures before committing to a target.
  • Choosing and documenting a cutover strategy — deciding between a downtime window and a change-data-capture approach that keeps the target in sync via binlog/WAL/oplog replication until the final repoint.
  • Converting and staging schema as reviewable migration scripts in version control, so the target DDL is peer-reviewed and builds clean in a sandbox before any row of data moves.
  • Sequencing the bulk data load during low traffic — deferring non-essential indexes during insert and rebuilding them afterward for speed, while tracking row counts and load duration to size the real cutover window.
  • Validating the move with row-count and checksum reconciliation, referential-integrity spot checks, encoding and timezone verification, and EXPLAIN ANALYZE benchmarks that confirm no query-plan regression on the target.
  • Executing a controlled cutover — going read-only on the source, draining final CDC changes to zero lag, repointing connection strings or DNS, and running post-cutover smoke tests before re-enabling traffic.
  • Defining a tested, owned rollback path so that if the gate fails, the team reverts cleanly to the source instead of patching forward under pressure.

Who uses it

A migration touches more than the person typing the commands, so the runbook is written to be read by several roles who each own a slice of the outcome. It is the shared source of truth during the window.

Database administrators (DBAs)They own the schema conversion, data load, and cutover mechanics — resolving type mappings, configuring CDC replication, and driving the EXPLAIN ANALYZE validation that proves the target performs.
Platform and DevOps engineersThey provision the target with matching version, capacity, and network access, manage connection-string and DNS repointing, and wire up the monitoring that the post-cutover phase depends on.
Backend and application engineersThey write and run the representative read/write smoke tests against the target, and confirm the application behaves identically against the new engine's quirks before the gate is signed.
Engineering managers and release leadsThey own the maintenance window, the go/no-go call, and the hard rollback deadline — and they need the runbook's named owners and success criteria to make those calls defensibly.
SREs and on-call respondersThey watch replication lag and error rate during the window and execute the rollback if the Pre-Cutover Gate fails, which only works if the rollback steps are written and tested in advance.

Context & good to know

Database migrations are among the highest-stakes operations any engineering team runs, because unlike an application deploy you cannot simply roll back a container image — the data has moved, and moving it back may itself lose writes. That asymmetry is why the runbook front-loads so much rehearsal: staging the schema in a sandbox, reconciling checksums table by table, and confirming zero replication lag before the repoint. The discipline exists precisely because the failure mode is data loss, not just downtime.

The rise of managed cloud databases has made migrations more common, not less. Teams move off self-managed PostgreSQL or MySQL onto platforms like Amazon Aurora to offload backups, patching, and failover; others consolidate onto MongoDB or migrate between Oracle Database versions to stay supported. Each move surfaces the same recurring questions buyers ask — what is an example of a database software, and which of the four broad database types (relational, document, key-value, and wide-column) fits the workload. A runbook keeps those strategic choices from derailing the tactical execution.

The near-zero-downtime pattern the runbook describes — initial bulk load plus change data capture until a brief read-only cutover — has become the default expectation for any database serving live traffic. It depends on the engine's replication stream (binary log in MySQL, write-ahead log in PostgreSQL, oplog in MongoDB) being healthy and drainable to zero lag, which is why the runbook treats lag confirmation as a gating check rather than a nice-to-have.

Spotsaas publishes this runbook as part of its database-management resources because the teams comparing engines on the platform — weighing Oracle Database, MongoDB, PostgreSQL, MariaDB, and Aurora — almost always face a migration as the cost of switching. A clear runbook makes that cost legible: it turns 'how hard would it be to move?' into a concrete, phased checklist a team can scope and rehearse.

✓ Independent · vendors can't pay to rank

Built on verified data, not vendor spin

Every Spotsaas resource draws on the Spotsaas Score — a blend of verified review ratings, review volume, and feature depth across 88 database management software tools. Refreshed regularly; data as of June 2026.

FAQ

Questions, answered

What is a database migration runbook?

It is a step-by-step operational document that takes a team through every phase of moving a database — assess and plan, convert the schema, load the data, validate, and cut over — with a checklist for each phase and a tested rollback path. Its purpose is to make the migration a script you execute rather than a series of decisions you improvise during the window.

What is the difference between a big-bang and a near-zero-downtime migration?

A big-bang migration takes a downtime window, moves everything at once, and brings the system back on the target. A near-zero-downtime migration does an initial bulk load and then uses change data capture (binlog, WAL, or oplog replication) to keep the target in sync with live writes, so the actual cutover is a brief read-only moment to drain final changes and repoint. The runbook helps you choose deliberately based on how much downtime your application can tolerate.

How do you validate a database migration before cutting over?

Reconcile row counts and checksums between source and target for every table or collection, spot-check referential integrity, encodings, timezones, and nullability on critical tables, run application smoke tests against the target, and benchmark key queries with EXPLAIN ANALYZE to confirm no plan regression. The runbook gates the cutover on all of these passing plus a fresh, restorable backup.

What is an example of a database software you might migrate between?

Common moves include MySQL or MariaDB to PostgreSQL for richer SQL features, self-managed PostgreSQL to Amazon Aurora for managed operations, or a relational store to MongoDB for a document model. Oracle Database version upgrades and Oracle-to-open-source moves are also frequent. The runbook is engine-agnostic in structure but expects you to resolve each engine pair's specific type and collation differences.

Why do you defer indexes during the bulk data load?

Maintaining indexes on every inserted row makes a large bulk load dramatically slower, because each insert has to update every index structure. Disabling or deferring non-essential indexes during the load and rebuilding them afterward is far faster overall, and it produces cleaner, less fragmented index structures on the target.

What goes in the rollback plan?

A copy-pasteable sequence to revert to the source, a validated and restorable backup taken immediately before cutover, the conditions that trigger a rollback (a failed reconciliation or smoke test), a hard rollback deadline, and a named owner who is authorized to call it. The runbook treats an untested rollback as no rollback at all.

How do you keep downtime near zero during cutover?

Run an initial bulk load ahead of time, then keep the target continuously in sync with change data capture. At cutover you set the source read-only, let CDC drain the final changes until replication lag hits zero, repoint connection strings or DNS to the target, and run smoke tests before re-enabling writes. The downtime is only the brief read-only drain, not the whole data load.

What are the four types of databases involved in migration decisions?

The four broad categories are relational (PostgreSQL, MySQL, Oracle, MariaDB), document (MongoDB), key-value (Redis), and wide-column stores. Migrations within a category are usually mechanical type-and-collation work; migrations across categories — relational to document, for instance — also require remodeling the data, which the assess-and-plan phase is meant to surface early.

When should you abort a migration mid-window?

Abort when any Pre-Cutover Gate check fails and cannot be quickly resolved: a failed checksum reconciliation, a red smoke test, non-zero replication lag at the repoint, or passing the hard rollback deadline you set during planning. The runbook makes aborting a clean, pre-decided action rather than a panic call.

Grow your pipeline with buyers who are already looking for you

254,000+ buyers use Spotsaas every month to evaluate and shortlist software. Get in front of them — for free, or with a managed growth plan built around your category.