TickYouOff
Back
🗄️

Database Migration Safety Checklist

Hard 15 items · 1 hour
testuser's avatar
testuser Published 3 weeks ago

A concise safety checklist for teams planning database migrations. It guides DBAs, developers, and operations engineers through backups, staging tests, rollbacks, and verification to reduce risk.

Progress
0 / 15
  1. Notify stakeholders and schedule maintenance window — Announce timeframe, expected downtime, and emergency contacts.
  2. Record pre-migration metrics — Capture DB size, row counts, slow queries, and replication lag.
  3. Take full backup of production database — Create snapshots or logical dumps using verified backup tools.
  4. Verify backup integrity by restoring to a test host — Confirm backups restore successfully and data is readable.
  5. Review migration scripts and schema changes line-by-line — Check for DROP, ALTER, long-running ops, and missing transactions.
  6. Run migration in staging using production-like data — Use a staging run to validate steps and estimate run time.
  7. Anonymize or scrub sensitive data for staging — Replace PII before using production data in non-prod environments.
  8. Execute migration on staging and run smoke & performance tests — Validate schema, app flows, and query performance under load.
  9. Create and test automated rollback script and procedure — Ensure rollback restores schema and data to a known good state.
  10. Estimate downtime and finalize cutover plan — Document exact steps, owners, timing, and fallback triggers.
  11. Put application into maintenance mode or lock writes — Prevent new writes to avoid data drift during cutover.
  12. Perform migration during maintenance window and monitor — Follow the plan, watch logs, replication, error rates, and metrics.
  13. Verify post-migration data integrity and app functionality — Run reconciliation queries, sanity checks, and key user flows.
  14. Compare post-migration metrics to baselines — Check query latency, throughput, error rates vs pre-migration.
  15. Retain backups, rotate logs, and document migration outcome — Keep backups until rollback window closes and record issues found.
Sign in to save
📝 My Notes