Book a free call

Data Migration from Legacy Systems: A Practical Plan

Moving data out of a legacy system means mapping old fields, cleaning years of drift and proving the new copy matches. This guide lays out a plan that works.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Data Migration from Legacy Systems: A Practical Plan
On this page

Short answer

Data migration from legacy systems means moving records out of an old system into a new one, mapping each field, cleaning the data, loading it in stages and proving the new copy matches before the old system is switched off. The work is mostly investigation and validation, not the loading itself.

What is data migration from legacy systems?

Data migration from legacy systems is the process of moving records out of an older system, such as a mainframe, an old ERP or a custom database, into a newer system, while keeping the records accurate and usable. It covers the data, not the application: the old system may be replaced, but the history it holds has to survive the move.

The migration usually starts with discovery. The team works out what data the old system holds, which tables and fields matter, and which records are still used. Legacy systems often hold decades of history, including records nobody has opened in years and fields whose meaning has drifted over time.

The goal is a new system that can answer the same questions the old one could, with the same records. That sounds simple, but legacy data rarely maps cleanly onto a new model, and the mismatches are where migrations fail.

Why is legacy data hard to move?

Legacy data is hard to move because it was shaped by years of workarounds, undocumented rules and formats that no longer match the new system. The table below lists the problems teams meet most often.

Problem What it looks like What it costs if ignored
Undocumented fields Columns nobody can explain Wrong mapping, lost meaning
Duplicate records Same customer twice, different IDs Double billing, bad reports
Free-text values Dates and codes typed by hand Load failures, bad filters
Orphaned rows Orders with no customer Broken links in the new system
Encoding and formats Old character sets, odd dates Unreadable names and amounts
Hidden business rules Logic only in old code Reports that stop adding up

None of these problems is visible from the schema alone. They only show up when the team profiles the actual data, which is why profiling comes before mapping, not after.

What are the steps in a legacy data migration?

A legacy data migration follows a fixed sequence: discover, map, clean, load in stages, validate, then cut over. Skipping a step moves the risk to a later stage, where it costs more to fix.

  1. Discover and profile. List every table and field, count the rows, and profile the values. Find duplicates, missing keys and odd formats before you plan anything.
  2. Decide what moves. Agree which records move, which are archived, and which are dropped. Moving everything, including dead records, is the most common scope mistake.
  3. Map field by field. Write down how each old field becomes a new field, including the rules for codes, dates and statuses. Get the business owner to sign the mapping off.
  4. Build and test the load. Load a sample into a test environment and check the counts and the totals. Fix the mapping, not the data, when the numbers disagree.
  5. Clean in the open. Fix duplicates and bad values with rules the team can review, and keep a log of every change so it can be reversed.
  6. Load in stages. Move reference data first, then the bulk history, then the recent records last. Validate after each stage, not only at the end.
  7. Cut over with a fallback. Freeze the old system, load the final records, run the checks, and keep the old system readable until the new one has run for an agreed period.

Keep the old system readable, not running, after cutover. Read access lets the team check a disputed record without keeping two systems live. Moving systems to the cloud is a related but different job; see legacy systems migration to cloud for the destination side of the story.

Example: a manufacturer moves 20 years of orders

Example (hypothetical): a manufacturer moves 20 years of order history out of a custom system into a new ERP. The data holds 500,000 order rows, 80,000 customer rows and 120,000 product rows, or 700,000 rows in total.

Profiling finds that 2% of the rows fail the checks, which is 14,000 rows to fix. Most are duplicate customers and orders with missing customer links. The team fixes them at a rate of 500 rows a day, so the cleanup takes 28 working days.

The team loads in stages: products and customers first, then orders older than a year, then the recent year last. After each stage it compares row counts and order totals with the old system. The final cutover happens on a weekend, and the old system stays readable for three months while the new ERP proves itself.

What are the common mistakes?

The most common legacy migration mistakes are moving everything, trusting the schema, and validating only at the end.

  • Moving dead records. Years of unused data slow the load and pollute the new system. Archive what is not needed.
  • Trusting the schema. The schema says what the fields should hold, not what they actually hold. Profile the data.
  • Mapping without the business owner. Codes and statuses carry meaning only the business knows. Get the mapping signed off.
  • Cleaning silently. Fixes with no log cannot be checked or reversed. Log every change.
  • Validating only at the end. A mismatch found at cutover has nowhere to go. Validate after every stage.
  • Switching the old system off too soon. Keep it readable until the new system has run long enough to prove itself.

Database moves have their own patterns; the database migration guide covers the mechanics of moving a database itself, while this article covers the legacy data inside it.

How do you validate the data after cutover?

You validate legacy data after cutover by comparing the new system with the old one on counts, totals and samples, and by watching the first weeks of live use.

  • Row counts. Every table should match the agreed count, with the difference explained by the records you chose to archive or drop.
  • Money totals. Order values, invoice totals and balances should reconcile to the old system within an agreed tolerance.
  • Sample checks. Pick a random sample of records and compare them field by field, including the awkward ones.
  • Business checks. Ask the team to run the reports they use every week and confirm the numbers look right.
  • Error watch. Monitor the new system's error logs for the first month, since bad data often surfaces as failed transactions rather than wrong reports.

Write the checks down before cutover and agree who signs them off. Validation without an owner becomes a quick glance, and a quick glance misses the rows that matter.

When should you keep the old system running?

You should keep the old system readable, and sometimes running, until the new system has proved itself on real work. The length of that period depends on how the data is used.

Read access is enough for most teams: the old system stays available for lookups and audits, but no new records are written to it. Keep it for a fixed period, such as one quarter, and agree the date it will be archived. Without a date, the old system stays forever and the team never fully trusts the new one.

Keep it running, not just readable, only when the new system cannot yet do something the business needs. That should be treated as a gap to close, with a named owner and a date, not as a permanent second system. A partner for data engineering can help with profiling, mapping and the staged load if your team is short on capacity.

Key takeaways

  • Legacy migration is mostly discovery, mapping and validation, not loading
  • Profile the real data before mapping; the schema alone hides the problems
  • Agree what moves, what is archived and what is dropped before you start
  • Load in stages and validate counts and totals after each stage
  • Keep the old system readable until the new one has proved itself

Frequently asked questions

How long does a legacy data migration take?

It depends on the volume and the messiness of the data. Profiling and cleaning usually take longer than the loading itself. A small system can move in weeks; a large one with decades of history can take months.

Should we move all our old data?

Usually not. Move the records the business still uses and archive the rest in a readable store. Moving dead records slows the load and carries old errors into the new system, where they are harder to find.

What is the difference from a database migration?

A database migration moves the database itself, while a legacy data migration moves the records out of an old system into a new one, often with a different data model. The two often happen together but need different plans.

How do we handle duplicate customers?

Find them during profiling, agree the rule for which record survives, and log every merge so it can be checked later. The business owner should approve the rule before any records are merged.

What if the old system has no documentation?

Then the data itself is the documentation. Profile it, interview the people who used it, and read the old code if it still exists. Budget extra time for discovery, since undocumented systems always hide surprises.

When is the migration finished?

When the new system has run for an agreed period, the checks have been signed off, and the old system is archived. Cutover day is the middle of the job, not the end of it.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a legacy data migration and want the mapping and checks done properly? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Data Engineering service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call