---
title: "Legacy System Migration: What to Prove First"
source: https://refact.co/insights/migration/legacy-system-migration
author: "Masoud Golchin"
date: "2026-11-20"
---

# Legacy System Migration: What to Prove First

Quebec’s vehicle insurance agency, SAAQ, approved its new system in 2015 with an estimated budget of C$638 million. It went live in February 2023 with nearly 20% of its final integrated tests unfinished and no parallel run. The province’s Auditor General now expects the cost to pass C$1.1 billion. The programming language plays no part in that story.

Legacy system migration usually goes wrong this way. It doesn’t matter much whether the old system is a mainframe, a custom store whose developer left, or a publishing platform nobody wants to patch. The rewrite is rarely what sinks the project. The losses come from business rules nobody wrote down, integrations nobody listed, data that looked clean until it was loaded, and a cutover date that counted for more than the evidence. This guide is for the people who approve, fund, or run that move. It covers what to find before you build, how to prove data and behavior arrived intact, what running two systems really costs, and what to put in writing before anyone signs a build contract.

## Legacy System Migration Moves Behavior, Not Just Code

A legacy system migration moves four things from an old platform to a new one: business behavior, data, integrations, and operational responsibility. The code is only how the behavior gets delivered. Customers and staff depend on the behavior itself: the renewal that charges on the right day, the invoice number a partner already holds, the report finance uses to close the month.

People use “migration” and “modernization” as if they mean the same thing, and that confusion costs money. Migration moves a system. Modernization changes its structure or what it can do. You can migrate without modernizing, for example by moving the same application to new hosting. You can also modernize without migrating, by refactoring in place. AWS’s large-migration guidance recommends migrating first and modernizing afterward when a deadline drives the work, because that shrinks the risky part. If you’re still weighing the broader options, our breakdown of [legacy system modernization strategies](https://refact.co/insights/digital-product/legacy-system-modernization-strategies) covers that decision.

Staying put has a cost too, but most of it never shows up on a hosting invoice. In a [2016 review of aging federal systems](https://www.gao.gov/products/gao-16-696t), the U.S. Government Accountability Office found the federal government spent more than 75% of its fiscal 2015 IT budget on operations and maintenance. Smaller organizations pay the same tax in a different form. One contractor understands the export. Someone keeps a spreadsheet of workarounds. A simple feature takes three weeks because nobody wants to touch the checkout code.

## The Most Expensive Failures Happened Outside the Code

The best-documented migration failures come from auditors, government commissioners, and securities filings, not vendor case studies. They tell a consistent story.

Birmingham City Council replaced SAP with Oracle Fusion in April 2022. The estimated cost rose from about £19 million to £131 million. Government commissioners pointed to weak governance and too little Oracle expertise, and the council couldn’t produce auditable accounts. Lamb Weston’s ERP transition reduced its inventory visibility enough to disrupt order fulfillment. Its April 2024 SEC filing estimated the hit at $135 million in lower net sales and $72 million in lower net income for the quarter. At SAAQ, the auditor couldn’t express an opinion on the agency’s 2023 financial statements.

None of these is a story about a bad framework. Each is a readiness problem: unfinished tests, missing skills, progress reports that understated trouble, or a business that relied on visibility the new system didn’t provide on day one. [GAO’s 2025 review of critical legacy systems](https://www.gao.gov/products/gao-25-107795) found the same gap at the planning stage. Only 3 of the 11 most critical federal systems had modernization plans with milestones, the work required, and a plan for retiring the old system. Seven already had modernization work underway.

You’ll see migration failure rates quoted everywhere: 48%, 70%, 87%, 90%. They measure different populations and different outcomes. The widely cited 90% figure from a Forrester study commissioned by Rocket Software refers to mainframe application rewrites that didn’t succeed on the first try. That’s one method on its first attempt, not migrations in general. No trustworthy general failure rate exists. The audited failures are a better guide, and they all point the same way.

## Pick a Strategy Per System, Not One for the Whole Company

Most organizations don’t do one migration. They run a set of separate projects, each with its own risks and its own definition of success. In Red Hat’s survey of 1,000 IT leaders, planned approaches split almost evenly: 20% replatform, 19% rehost, 18% refactor, 15% retain, 13% repurchase, and 10% retire. And 85% expected the work to take two or three iterative steps rather than one jump.

| Strategy | What changes | Fits when | What it costs you |
| --- | --- | --- | --- |
| Rehost (lift and shift) | Same code, new infrastructure | The immediate threat is failing hardware or an end-of-support deadline | All existing technical debt moves with it |
| Replatform | Runtime or database moves to a supported version, logic stays | Business logic is sound but the foundation is unsupported | Queries, extensions, and scheduled jobs still need full testing |
| Refactor | Code is restructured in bounded slices while behavior is preserved | The system holds valuable rules and has a long future | Slow, and every slice needs proof of parity |
| Repurchase or replace | A new product takes over the job | The old workflow is itself the problem | Training, permissions, reporting, and process change for every user |
| Retain | Nothing, for now | The business case for moving is weak or unproven | Ongoing maintenance and shrinking skills |
| Retire | Live system switched off, data archived | Records must be kept but are rarely used | Someone must own archive access, retention, and deletion |

Retain belongs on that list. Among mainframe users Kyndryl surveyed, the average share of applications they plan to move off the mainframe fell from 36% to 28%. Ensono found that only 11% of large organizations plan full legacy retirement, while 47% plan partial modernization and keep their core systems. A hybrid setup that runs for years is the normal outcome.

Full rewrites carry the most risk because none of the value arrives until all the work is done. An [AWS analysis of federal mainframe spending](https://aws.amazon.com/blogs/publicsector/analysis-mainframe-migration-can-save-us-federal-government-estimated-1b-by-2030/?trk=article-ssr-frontend-pulse_little-text-block) notes that complete code rewrites can cost tens of millions of dollars and take four or more years. Those are federal numbers, not a price guide for a membership site. The pattern still holds at smaller scale: if nothing ships until everything ships, every wrong assumption surfaces at the end.

A practical plan mixes approaches. One business might rehost its reporting service to get off aging servers, refactor account management in slices, replace its storefront with a standard product, and retire an old campaign database. Each decision gets its own reasoning.

## Discovery: Find the Behavior the Code Doesn’t Show

A 2024 industrial experience report published by the ACM gives one of the most candid accounts of what turns up mid-migration. The team shifted production traffic to the new system gradually. Problems appeared at 5% of traffic. At 20%, an automation failed because it depended on a deprecated platform API. The team had already contacted six of the seven automation owners they knew about. The seventh surfaced late, in production.

That’s normal. A system’s behavior reaches well past its main code path, into scheduled jobs, scripts, reports, audit trails, authorization rules, and integrations other teams built years ago. In Flexera’s 2024 survey, 54% of respondents named understanding application dependencies as a top migration challenge. Practitioner threads on Reddit list the same blind spots again and again: logging, audit trails, authentication, authorization, and integrations left out of rewrite plans.

### Inventory what the outside world holds

External identifiers do quiet damage. Order numbers, invoice IDs, ticket QR codes, and API endpoints already sit in customer inboxes, partner systems, and accounting records. Renumber them and the migration “succeeds” while support tickets pile up. List every identifier customers or partners hold, and treat it as a contract the new system has to honor.

### Capture the rules people carry

Some rules exist only in people’s heads. An administrator might know that an empty membership end date means lifetime access, not missing data. A developer who doesn’t know that will turn valid accounts into expired ones. Ask the people who run exports and fix errors to demonstrate three cases: a normal one, a failed one, and one they fix by hand. Record the rule, then have a business owner approve it in writing.

When documentation is missing and the original developers are gone, treat the running system as the spec. Practitioners call the most reliable technique characterization testing, or “golden master” testing. You feed the legacy system real inputs, record its actual outputs, and require the new system to produce the same results. It captures behavior nobody remembers designing, including the bugs downstream systems now depend on.

Discovery also covers cost and organization, not only code. An [empirical study of cloud migration challenges](https://arxiv.org/pdf/2004.10724) treats modification effort, training, licensing, specialist skills, pricing, and organizational responsibilities as connected factors in deciding whether a system suits the cloud. A cheaper hosting quote accounts for none of them.

Discovery is also where you decide what not to move. When Teton Gravity Research came to us, 10,000 articles sat in ExpressionEngine, a legacy CMS that was barely staying online, and earlier migration attempts had stalled. They asked for a redesign. Before quoting it, we asked what the platform actually needed to do. Part of the answer was retiring the user-generated content features, which had become legally risky and impossible to moderate at scale. In the [Teton Gravity Research rebuild](https://refact.co/work/teton-gravity-research), deciding what to leave behind shrank the migration before any code was written.

### AI coding agents shorten the build, not discovery

AI agents are now pitched as a way to clear long-deferred migrations. The one measured study in our research is a useful check. A 2026 arXiv case study migrated 12 features from two VB6 modules of a long-running ERP to C# on .NET 10. It checked behavior and the resulting database state, which is a stricter test than “it compiles.” In a single pass, the agent reached 92% equivalence on low-complexity features and 47% on high-complexity ones. Rules scattered through forms were easy to miss, and complex approval workflows came out simplified in ways that changed business outcomes.

That’s one system, one language pair, and a small sample, so it isn’t a general benchmark. The lesson still holds. Use agents to draft candidate rules and generate characterization tests, have people who know the business confirm each rule, then build the new implementation against the tests rather than the old source. As writing code gets cheaper, senior verification time becomes the bottleneck.

## Decide What Data Moves, Then Prove It Moved Correctly

Put every dataset into a bucket before anyone writes a migration script. **Keep live** covers records the new system needs to serve customers and run operations. **Archive** covers records people must be able to find but won’t change. **Retire** covers data with no remaining business purpose, deleted under your retention rules. The [Natuvion Transformation Study 2026](https://www.freep.com/press-release/story/271668/natuvion-transformation-study-2026-two-thirds-of-companies-leave-legacy-data-behind-during-it-transformations/) reports that about two-thirds of companies leave legacy data behind during IT transformations. Moving only some of the data is a decision you make on purpose. It doesn’t mean the job is incomplete.

For each dataset, record who needs it, why, and how quickly they must be able to retrieve it. An archive only a developer can search doesn’t help anyone. Our explainer on [what a database migration involves](https://refact.co/insights/migration/what-is-db-migration) separates the structural work from these keep-or-leave decisions.

### Expect the data to be worse than “it’s worked for years” suggests

One practitioner on X described moving about a million rows from SQL Server to PostgreSQL. The data turned out to contain thousands of NULL names, invalid emails, orphaned foreign keys, and negative prices. The team built schema extraction, type mapping, batched loads, and a validation dashboard that blocked release unless counts matched exactly, and they shipped with zero downtime. The dashboard did the real work. Truncating values into shorter columns can “succeed” technically while destroying information, and only a check designed for it will catch it.

If your old process runs on spreadsheets, the same problem shows up as formulas and manual adjustments. CEFCore’s guide to [moving off legacy CEF spreadsheets](https://cefcore.com/blog/data-migration-tools/) walks through that version of the problem. Keep the business owner in the room when workbook logic becomes database logic.

### A finished job is not a correct one

Replication tools report progress, not correctness. Their documentation is specific about the gaps:

-   **AWS DMS homogeneous migrations** have no built-in data validation. PostgreSQL views migrate as tables, and encrypted MySQL data can arrive unencrypted.
-   **PostgreSQL logical replication** doesn’t replicate schema changes (DDL), ongoing sequence changes, or large objects.
-   **AWS DMS validation** can require a primary key or unique index, can’t validate some objects, and may not validate rows that keep changing.
-   **Change data capture** uses source CPU and I/O, and AWS warns it can hurt the live application’s performance.

Make each gap its own workstream: sequences, large objects, views, newly created tables, and encryption. Then reconcile independently. The [migration-testing guidance published by IJERET](http://ijeret.org/index.php/ijeret/article/download/299/282) describes source-to-target checks covering data types, missing values, relationships, transformations, encoding, timestamps, permissions, and record-level comparisons. A matching customer count can hide wrong email addresses or swapped permissions. Check that each order belongs to the right customer and that totals, discounts, tax, and refunds still mean what they did.

![Legacy system migration data validation screen comparing source and target tables](https://refact.wpengine.com/wp-content/uploads/2026/11/image_placeholder_1-6.avif)

Even when a migration marks every table completed, post-replication validation can reveal hidden data mismatches. · Source: aws.amazon.com

Test at production scale. Another practitioner described a migration “tested thoroughly” against a database holding about 1% of production data. In production it took three hours instead of 20 minutes, causing cascading timeouts and hours of degraded service. Their conclusion was blunt: if you aren’t testing against production-scale data, you’re hoping, not testing.

Some things can’t be copied at all. Password hashes may use incompatible formats. Payment tokens are often tied to a specific provider or merchant account. Test transfers with sample records before you promise customers continuity, and plan a reset or re-authorization path if the transfer isn’t allowed.

## Budget the Overlap: Parallel Running Is Safe and Expensive

The safest migration patterns all run old and new systems side by side for a while. With the Strangler Fig pattern, you route one slice of functionality to the new system behind a facade, prove it, and expand. A shadow run calls both systems, returns the legacy result, and compares the two. For databases, dual-write with a gradual read shift writes to both stores, moves reads over in steps with consistency checks, then retires the old store.

![Strangler Fig pattern diagram for incremental legacy system migration](https://refact.wpengine.com/wp-content/uploads/2026/11/image_placeholder_2-11.avif)

An indirection layer routes user traffic between concurrent legacy and modern systems, illustrating the operational overlap teams must budget for before decommissioning can occur. · Source: www.thoughtworks.com

Each pattern has a trap. Shadowing write operations fires side effects twice, so customers get two emails or two charges. Stub side effects or gate write paths until the evidence is strong. Schema changes need expand-and-contract sequencing: add compatible structures, deploy code that understands both shapes, and remove old elements only after nothing reads them.

The cost of overlap is where budgets break. The ACM team of five developers and one tester spent an estimated 2,880 to 5,760 hours across 36 development cycles. Some urgent features had to be built and tested in both systems, and testing became the bottleneck. Practitioner accounts are harsher. One team planned a one-year migration that took three, and described maintaining both versions as “hell.” Another described a six-month project that ran five years and cost $9.2 million against a $600,000 budget, though it did end up working better for users.

The answer isn’t to skip parallel running. SAAQ’s lack of a parallel run is part of what the Auditor General flagged. The answer is to fund the overlap explicitly: duplicate feature work, test capacity, and a defined date when the old system is switched off. One experienced Hacker News commenter said he could count on one hand the migrations where the old system was actually turned off. A strangler with no end date just means you run two systems forever, which can be worse than running the original. Keep slices small enough to finish. If you want the incremental mechanics in more depth, our [incremental modernization playbook](https://refact.co/insights/migration/legacy-application-modernization) covers how to sequence and validate them with real traffic.

## Cut Over When the Evidence Says So, Not When the Calendar Does

AWS’s migration guidance treats cutover as a readiness gate. Before any wave moves, you need dependency mapping, a tested target environment, working data replication, cutover and rollback runbooks, dry runs, and an operational handover. It also warns against starting the first wave with no buffer after planning, and recommends starting with a small migration that tests the whole operating model, not only the technology.

Write your go or no-go rule as evidence, not confidence. “Reconciliation shows zero unexplained mismatches across the last three dry runs” is a rule. “The team feels ready” is not. Leaders also need to be willing to delay. SAAQ received written warnings in 2022 and went live anyway.

![Cutover diagram showing traffic switching between legacy and new systems with rollback path](https://refact.wpengine.com/wp-content/uploads/2026/11/image_placeholder_3-9.avif)

A centralized router governs live user traffic between environments, providing a verified gate to cut over only when ready—and an immediate path to roll back if needed. · Source: semaphore.io

### Shift traffic gradually, and measure it

Gradual traffic shifting limits the damage when something breaks, but only if you can see the damage. The ACM team didn’t have error-rate metrics, which limited its ability to anticipate problems as traffic moved. Put error rates, latency, and business signals like completed orders on a dashboard before the first percentage moves.

A rollback plan needs more than a backup. Define what triggers a reversal, who authorizes it, and what happens to transactions the new system accepted in the meantime. Without that last part, rolling back leaves orders split across two platforms. Assign one person to lead the switch-over so the team never gets conflicting instructions.

### Protect what the public already links to

For content-heavy sites, URLs are external identifiers too. When the Keck School of Medicine at USC consolidated nearly a decade of newsroom and research content spread across subdomains and microsites, the work depended on treating every cited, indexed, and linked page as something that had to keep working. The [Keck School of Medicine migration](https://refact.co/work/keck-school-of-medicine-of-usc) moved that content without losing readers because redirects and metadata were planned before the switch, not cleaned up afterward. For stores, [PlatformDTC’s ecommerce migration playbook](https://platformdtc.com/blog/ecommerce-platform-migration) covers the commerce version: inventory ownership, duplicate fulfillment records, and stored payment methods that break checkout.

### Don’t call it done after launch week

Hidden rules surface on rare events. Practitioners recommend running in parallel, or at least watching closely, through a full business cycle, including month-end and, where it matters, year-end. Annual renewals, tax adjustments, and fiscal-year reports are where the rule nobody documented finally fires. Set the old system’s retirement date after those checks pass, and keep archive access available.

## What Legacy System Migration Costs, and What Nobody Can Tell You Yet

No reliable general answer exists to “how long and how much.” The examples in our research range from under 12 weeks (a vendor-reported Hughes project) to 16 months (Alpitour’s COBOL-to-Java move) to two years (Meliá, against a four-year estimate). Those are vendor-published successes. The independent data is less flattering: Natuvion and NTT DATA’s 2026 study of 1,115 participants found more than 80% exceeded their transformation budgets and 79.5% fell behind schedule.

The useful method is to measure what staying costs, not just what moving costs. [Carnegie Mellon’s coverage of defense modernization](https://www.cmu.edu/news/stories/archives/2026/november/cmus-software-engineering-institute-tackles-risks-of-modernizing-defense-software), citing GAO figures, puts the operating and maintenance cost of ten federal legacy systems at about $337 million a year, roughly $33.7 million each. Your numbers will be smaller. The comparison works the same way.

Build the business case in four separate amounts:

-   **Current annual run cost:** hosting, licenses, maintenance, specialist staffing, recurring security fixes, and staff hours spent on workarounds.
-   **Migration cost:** discovery, design, development, conversion scripts, testing, and training.
-   **Transition cost:** parallel hosting, duplicate licenses, duplicate feature work, customer communication, and launch support. This is the line most estimates leave out.
-   **Expected benefit:** direct savings and specific avoided losses, with the assumption written next to each.

Here’s a hypothetical. A system costs $40,000 a year to run, plus $25,000 a year in staff time on workarounds. That’s $65,000 a year before any migration spending. Compare staying and moving over three to five years, and show when the old costs actually stop. Savings don’t start when development starts. They start when the old system is switched off.

Don’t assume the cloud is cheaper or faster by default. Ekco found 70% of IT decision-makers expect cloud to cut costs, while Flexera found 84% name managing cloud spend as a top challenge. When Quora moved from Redshift to Trino, some queries ran much slower until statistics and query plans were tuned, and the team had to scale the cluster temporarily to meet its service levels. Benchmark the target environment under your real load before you count savings.

Finally, compare estimates on scope, not price. A low quote that leaves out reconciliation, redirects, training, or retirement isn’t a cheaper version of the same project. It’s a smaller project.

## Put the Scope in Writing Before You Hire a Build Team

If the scope isn’t written down, you’re comparing each vendor’s assumptions instead of comparable plans. Before build work starts, you should have:

-   **A system inventory** with a named owner, a stated purpose, and a chosen strategy for each system.
-   **Data decisions** sorted into keep-live, archive, and retire, with retention rules confirmed.
-   **A dependency list** covering integrations, scheduled jobs, reports, and external identifiers, each with an owner who has been contacted.
-   **A parity definition** stating which rules, data effects, and interfaces must behave exactly as before, and how you’ll test them.
-   **Explicit exclusions**, including passwords, payment credentials, and subscription states that may not transfer.
-   **Readiness gates** for each wave, plus a rollback trigger and a retirement date for the old system.
-   **Open questions** that could change the plan or the estimate.

Grail Computer Labs’ discussion of [pricing hidden dependencies in legacy migrations](https://grail.computer/blog/legacy-system-migration-services) is a useful way to pressure-test that list. A proposal that names a new stack without addressing dependencies has left the hardest work unpriced.

Most of this list comes out of discovery, which is why we run discovery before quoting builds. Across 12 years and more than 200 projects, the migrations that went smoothly were the ones where the people who heard the business rules in week one were still on the project when those rules became software. Our discovery phase carries a money-back guarantee because its whole job is to produce a scope you can read, challenge, and approve.

Legacy system migration is a long transfer of responsibility, and each step should be gated by evidence. The code conversion is the easiest part to estimate and the least likely to sink you. If you’re trying to work out which systems to move, which data to keep, and what proof you need before cutover, that’s the early work our [data migration work](https://refact.co/services/data-migration) starts with.

## FAQ

### What is the difference between legacy system migration and modernization?

Migration moves a system, its data, or its infrastructure to a new platform. Modernization changes the system's structure or capabilities, for example by refactoring code or replacing a workflow. You can do either without the other. When an end-of-support deadline is driving the work, AWS recommends migrating first and modernizing afterward to keep the risky part small.

### Should we rewrite the legacy system or replace it incrementally?

Practitioners and migration guidance lean strongly toward incremental replacement, such as the Strangler Fig pattern, where small slices move to the new system and get proven one at a time. Full rewrites tend to lose undocumented behavior and grow in scope, and they deliver nothing until the end. Incremental approaches have their own risk: without a defined retirement date, you can end up running two systems indefinitely.

### How do we migrate data without losing or corrupting it?

Audit source data quality first, because years of production use usually leave invalid and orphaned records. Then treat tool gaps as explicit workstreams, since tools like AWS DMS and PostgreSQL logical replication skip things such as sequences, large objects, and schema changes. Reconcile source and target independently at the record and field level, and rehearse with production-scale data rather than a small sample.

### How long does a legacy system migration take?

No reliable general benchmark exists. Published examples range from under 12 weeks to several years, and independent surveys report that most transformation projects run over schedule. The biggest drivers are how much undocumented behavior turns up in discovery, how many integrations must be preserved, and how long old and new systems have to run in parallel.

### What if the original developers and documentation are gone?

Treat the running system as the specification. Record real inputs and outputs as characterization tests, log actual data flows, and interview the staff who handle exceptions and manual fixes. AI tools can draft candidate business rules from the old code, but each rule should be confirmed by someone who knows the business before the new system is built against it.

### When should we keep a legacy system instead of migrating it?

Keep it when the quantified cost and risk of moving outweigh the benefit, and decide system by system. Surveys show that retaining some legacy systems in a hybrid setup is the norm: Ensono found only 11% of large organizations plan full retirement. If you keep a system, document its rules and reduce your reliance on a single person who understands it.
