Think Build Implement Repeat
Data & Scraping

Data Migration: How to Move Systems Without a Disaster

Last updated:

Migrations fail on data, not on code

The transformation logic is rarely the hard part. What causes migration disasters is the source data being different from what everyone believed: fields used for a second purpose, records with impossible dates, a customer with 400 addresses, encoding problems in names.

None of that appears in a specification. It appears when you profile the data, which is why profiling comes first.

Step one: profile before you plan

  1. Count records per entity, and compare with what people believe the counts are
  2. Check completeness per field — the ones that are 40% empty tell a story
  3. List distinct values in every field that should be constrained, and expect surprises
  4. Find the outliers: oldest record, largest text, most relationships, strangest characters
  5. Identify duplicates before rather than after they arrive in the new system
Profiling routinely changes the plan. Discovering that a “notes” field has been used to store delivery instructions for six years is the kind of thing that reshapes a migration — and it is far better discovered in week one.

Step two: rehearse the whole thing, twice

A rehearsal is the complete migration into a copy of the target, with real data at real volume. The first one finds the data surprises. The second confirms the fixes and gives you a reliable timing.

Timing matters more than teams expect. If the migration takes eleven hours and your cutover window is four, that is much better known two weeks before than on the night.

Step three: reconcile properly, not by spot check

  • Record counts per entity, source versus target, matching exactly or explained exactly
  • Financial totals, which must match to the penny
  • Checksums on key fields across the full set
  • Relationship integrity — no orphaned records
  • A sample of complete records compared field by field, chosen to include the weird ones

“We looked at twenty records and they seemed fine” is not reconciliation, and it is what most projects actually do.

Step four: cut over with a way back

Freeze changes in the source, run the final migration, reconcile, then open the new system. Keep the old one available read-only for at least three months — someone will need a record that did not migrate cleanly, and having it available turns a crisis into an inconvenience.

Have a rollback plan written down and agreed before the night, including the point of no return. Deciding at 2am whether to roll back is not a decision anyone makes well.

What to leave behind

Not everything deserves to come. Archive rather than migrate anything that is finished, inactive for years, or known to be junk. Migrating rubbish costs time, extends the window and pollutes the new system on day one.

Agree the archive rules with the business rather than deciding technically, and keep the archive accessible — the objection to archiving is almost always “what if we need it”, which is answerable.

Frequently asked questions

How long does a data migration take?

For a straightforward system with a few entities, two to six weeks including rehearsals. Complex migrations with heavy transformation or poor source data run to several months, and profiling first is what makes that estimate meaningful.

Should we migrate historical data?

Migrate what will be used and archive the rest in a readable form. Full historical migration is often demanded reflexively and rarely needed in practice, and it is frequently the largest cost driver.

Can we run both systems in parallel?

For reading, yes and it is reassuring. For writing, avoid it — dual-write periods create divergence that is painful to reconcile and tends to outlast the plan.

What if we find bad data during migration?

Decide the rule per case: fix, exclude with a report, or migrate as-is and flag. What matters is that the decision is explicit and recorded, so nobody is surprised by what arrived.

Keep reading

Moving systems and worried about the data?

Profiling is a few days of work and it changes most migration plans. Tell us what you are moving from and to.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Web ScrapingData Science