Testing a data migration
Prove what moved, what changed and what can still be recovered. Practise the switch and protect new work if the team needs to go back.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: moving house and keeping the old keys. You count the boxes before and after a move. But equal counts could hide one lost box and one copied label. You need to check whose boxes arrived and what is inside them.
Daily List is a to-do list app. Leo, the developer, moves its lists and tasks to a new database. A database stores data so the app can find and change it. Tom, the tester, checks that people can still use their own lists.
Before the real move, Tom practises on a safe copy. He checks the data, opens the app and times the whole job. Finishing the copy is only part of it. There must also be time to check the result and recover if something fails.
Nina's tasks arrive, but the list they belong to is missing. Counting tasks alone misses that broken link. Tom stops the move and keeps the failed rows as evidence for Leo.
Keeping the old keys helps, but it is not a full plan. Suppose Nina adds a task in the new app. The old database does not hold it. Going back without saving that change would lose her work.
The picture has a limit. A data move can happen in stages, with changes copied while people keep working. The team must test the chosen way forward and the way back.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Checking a data move like a house move, while testing how to preserve work made after the switch.
- Practise
- Compare
- Try the app
- Protect new work
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Counting and reading box labels | Checking counts, keys and links |
| Checking what is inside | Comparing mapped values and trying user actions |
| Practising the move | Timing the copy, checks and recovery |
| Keeping the old keys | Retaining recovery options, with a plan for new work |
WHERE THIS PICTURE STOPS
- An old key opens the house, but an old database does not contain work added after cutover.
- A migration may run in stages while changes are copied; it is not always one trip.
- Equal box counts do not show that the right contents arrived.
HOOK
Practise, compare, try the app, protect new work.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
Check the contents, try the new place, and plan how to keep later work.
| In the trick | What it stands for |
|---|---|
| Check the contents | Compare expected and actual records, not just counts |
| Try the new place | Test the app with migrated data |
| Keep later work | Test recovery of changes made after the switch |
The mapping deliberately changes or combines records; raw equality is then the wrong check.
TELL A FRIEND
Count the boxes and check their contents, then try living in the new house. Keeping old keys is not enough if new work exists only in the new place.
OFTEN MIXED UP WITH Data movement and ETL checks. Data pipelines repeat a data load. Migration adds a change of system or structure and a cutover decision. Both need comparison and recovery tests.
Sources & standards — 3 sources
- Market practice
AWS Prescriptive Guidance: Pre-cutover stage ↗ — Amazon Web Services · Developing a cutover plan and Creating a cutover runbook: rehearsal, downtime, rollback time, task owners and dependencies. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
- Market practice
AWS Prescriptive Guidance — Cutover stage ↗ — Amazon Web Services · Cutover approach and Rollback: all-at-once and phased options; handling unchanged data differs from protecting new writes after cutover. Relevant primary passage opened 8 November 2026.
- Market practice
Migrate to Google Cloud: Transfer your large datasets ↗ — Google Cloud · Step 4, migration approaches: scheduled maintenance and continuous replication use different copy and cutover sequences. Retire the source only when it is no longer needed for fallback. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
PRACTISE AND KEEP
Sources for this topic — 11 sources
- Market practice
AWS Prescriptive Guidance: Pre-cutover stage ↗ — Amazon Web Services · Developing a cutover plan and Creating a cutover runbook: rehearsal, downtime, rollback time, task owners and dependencies. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
- Market practice
AWS Prescriptive Guidance — Cutover stage ↗ — Amazon Web Services · Cutover approach and Rollback: all-at-once and phased options; handling unchanged data differs from protecting new writes after cutover. Relevant primary passage opened 8 November 2026.
- Market practice
Dynamics365 implementation guide — Prepare for go-live: cutover strategy ↗ — Microsoft · Develop a cutover plan, Practice the cutover plan and Execute the cutover plan: task ownership, realistic rehearsal and go/no-go criteria. Dynamics 365 guidance, not a universal weekend rule. Relevant primary passage opened 8 November 2026.
- Market practice23 January 2024
Manage configuration and migration data for Dynamics 365 ↗ — Microsoft · Migration data: agreed scope, field and value mapping, source analysis, transformation and validation. The Daily List fixture is an editorial application. Relevant primary passage opened 8 November 2026.
V57 actual primary-source review after completed domain analysis. Read scope: All substantive lines31–103 and footer read.
No full-document certification beyond the stated scope. Paraphrase teaching; public accessibility does not establish image republication permission.
- Market practice
Validate your data migration: Spanner ↗ — Google Cloud · Validate your data migration: schema mapping, row counts, sampled rows, column checks and custom checks. Spanner guidance, not proof that totals establish equality. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
- Market practice
AWS Database Migration Service: Data validation ↗ — Amazon Web Services · Row comparison, validation states and Limitations: pending or suspended is not validated; keys, concurrent writes, time and resource costs affect coverage. AWS DMS-specific behavior. Relevant primary passage opened 8 November 2026.
The existing source is reused. Row comparison, table validation states and Limitations sections were opened 8 November 2026. Synthetic fixtures are local teaching examples, not live AWS DMS runs.
- Market practice
PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · PostgreSQL 18 sections 5.5.4–5.5.5 and 9.24.1–9.24.3: unique non-null primary keys, nullable foreign keys, EXISTS and NOT IN. The synthetic query outputs are separately tested in SQLite, not PostgreSQL. Relevant primary passage opened 8 November 2026.
An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.
Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.
One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read from the
postgres/postgresdocumentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page. - Market practice
Combining Queries: UNION, INTERSECT, EXCEPT (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · PostgreSQL 18 section 7.4: EXCEPT compares selected columns, drops duplicate rows unless ALL is used, and requires compatible column counts and types. Relevant primary passage opened 8 November 2026.
PostgreSQL18 publisher documentation opened on6November2026: §7.4 UNION/INTERSECT/EXCEPT and ALL. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
Configure fallback and cutover: Spanner ↗ — Google Cloud · Configure fallback and cutover: reverse replication carries new writes back to the source and must address mappings and failures. Spanner-specific guidance; no universal safe-return guarantee. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
- Market practice
Migrate to Google Cloud: Transfer your large datasets ↗ — Google Cloud · Step 4, migration approaches: scheduled maintenance and continuous replication use different copy and cutover sequences. Retire the source only when it is no longer needed for fallback. Relevant primary passage opened 8 November 2026.
Relevant primary sections opened 8 November 2026. Synthetic exercises are editorial applications, not publisher incidents. No live migration or provider execution claimed. No image licence inferred from public access.
- Market practice
ISO/IEC/IEEE 29119-14: data migration testing project page ↗ — International Organization for Standardization · Public ISO project page, checked 22 November 2026. DIS registered 10 November 2026, stage 40.00, under development. Earlier stage 30.99 was recorded in the 8 November review. No draft text was opened and publication is not claimed.
The 8 November check showed the older stage 30.99, dated 22 October. The project page now records draft registration on 10 November 2026. The draft text was outside this review.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.