Database Migration Safety Checklist
15 items · Technical · Hard difficulty · 1 hour
Essential safety steps to back up, test, and verify database migrations.
-
Notify stakeholders and schedule maintenance window
Announce timeframe, expected downtime, and emergency contacts.
-
Record pre-migration metrics
Capture DB size, row counts, slow queries, and replication lag.
-
Take full backup of production database
Create snapshots or logical dumps using verified backup tools.
-
Verify backup integrity by restoring to a test host
Confirm backups restore successfully and data is readable.
-
Review migration scripts and schema changes line-by-line
Check for DROP, ALTER, long-running ops, and missing transactions.
-
Run migration in staging using production-like data
Use a staging run to validate steps and estimate run time.
-
Anonymize or scrub sensitive data for staging
Replace PII before using production data in non-prod environments.
-
Execute migration on staging and run smoke & performance tests
Validate schema, app flows, and query performance under load.
-
Create and test automated rollback script and procedure
Ensure rollback restores schema and data to a known good state.
-
Estimate downtime and finalize cutover plan
Document exact steps, owners, timing, and fallback triggers.
-
Put application into maintenance mode or lock writes
Prevent new writes to avoid data drift during cutover.
-
Perform migration during maintenance window and monitor
Follow the plan, watch logs, replication, error rates, and metrics.
-
Verify post-migration data integrity and app functionality
Run reconciliation queries, sanity checks, and key user flows.
-
Compare post-migration metrics to baselines
Check query latency, throughput, error rates vs pre-migration.
-
Retain backups, rotate logs, and document migration outcome
Keep backups until rollback window closes and record issues found.
Printed from TickYouOff — the interactive version tracks your progress and can be shared with others.