Legacy system modernisation: rebuild, refactor or replace?

Legacy system modernisation is the work of bringing an ageing system back to a state where it can be supported, secured and extended, without losing the business logic it holds. Most legacy systems do not need a full rebuild: depending on the system, the answer may be to stabilise it, refactor it in place, rebuild it in stages, replace it with an off the shelf product or switch it off.
Most legacy systems still work, which is why the decision keeps moving to next financial year. Sentia has been building custom software in Sydney since 2006, and much of our work is taking over, maintaining and extending Rails applications other teams started. This guide covers how to tell whether your system needs work, how to choose between seven options and how to modernise without stopping the business.
What is legacy system modernisation?
Legacy system modernisation covers any planned change that reduces the risk and cost of running an old system while keeping what it does for the business. You decide system by system, and sometimes module by module, rather than applying one technology choice to everything you own.
What makes a system legacy
A system becomes legacy when it is harder to change safely than the business needs it to be. Age plays a part, but it is not the test. A five year old app on an abandoned framework can be more of a problem than a fifteen year old platform on a maintained stack with a team who understands it.
The usual signs are a language, framework or database version that is no longer supported, knowledge held by one or two people, integrations that run on manual exports and scripts, documentation that lives in someone's head and no automated tests, so every change carries risk.
Modernisation, migration and rebuild are different things
Migration changes where a system runs, for example from an office server to the cloud. A rebuild rewrites it from scratch. Modernisation is the umbrella term, and a project may include a migration, a rebuild, both or neither. The difference matters when you budget: moving an application to the cloud without changing it can raise hosting costs and leave the same code problems in place.
Signs your system needs modernising
Security patches are no longer released for your language, framework, operating system or database.
One or two people hold the knowledge needed to change the system, and a holiday or a resignation would stall it.
Small changes take weeks because nobody is sure what else they will break.
Staff key data between systems or export to spreadsheets to fill the gaps.
New payment providers, partner APIs or AI tools cannot connect without workarounds.
Hosting or licence costs keep rising while the system does the same job.
Auditors, insurers or enterprise customers ask security questions you cannot answer with confidence.
If only the cost or workaround signs apply, a steady maintenance routine may be enough; our engineers explain how we run one in maintenance is a habit, not a project. If either of the first two signs applies, start an assessment soon. An unpatched system or a departing key person can turn a planned project into an emergency.
The cost of leaving a legacy system alone
The cost of doing nothing rarely appears as a line item, so it gets ignored. In its 2020 to 21 audit of Services Australia's welfare payment system redevelopment, the Australian National Audit Office found that Services Australia did not monitor the cost of operating the existing system. It also found that delays to decommissioning key parts of the old system put the program's expected benefits at risk, and that arrangements to migrate data were not yet established.
If a federal program of that size can lose sight of its running costs, check whether your business measures its own. Add up hosting, licences, support hours, staff time spent on workarounds and the cost of incidents over the past twelve months. Then list the projects you have shelved because the system cannot support them.
How to assess a legacy system before choosing a strategy
Assess before you pick a technology, a vendor or a framework. Score each system on two axes: business value (how much revenue or daily operation depends on it) and technical health (how supported, tested and changeable it is). The combination points to a response.
Business value | Technical health | Suggested response |
|---|---|---|
High | Poor | Priority for modernisation |
High | Good | Maintain well and leave in place |
Low | Poor | Candidate to retire |
Low | Good | Retain and review later |
A useful assessment covers a system inventory with support status, a map of data flows and integrations, code health (test coverage and framework versions), security posture and current running cost. Undocumented integrations are a common cause of delay, so map them before you estimate anything.
This is the ground our engineers cover in a technical audit through our expert consulting service, with written findings on architecture, code quality, security posture and scalability. When a project is already in trouble, the code review in our Project Rescue service lists critical issues and recommended fixes, the order to make them in and an estimate of how long the work will take.
Seven legacy modernisation options compared
You do not have to rebuild. The options below adapt the "7 Rs" in AWS's migration guidance so they cover software modernisation as well as cloud moves.
Option | What it means | Effort | Risk | Best when |
|---|---|---|---|---|
Retain | Keep the system as is and revisit on a set date | Low | Low now, grows over time | Stable, low value systems, or ones that depend on others moving first |
Retire | Switch off and archive the data | Low | Low if data is archived properly | Little use, or functions duplicated elsewhere |
Rehost | Move to new infrastructure with no code changes | Low to medium | Low | Hardware or hosting reaching end of life |
Replatform | Move with targeted changes such as a managed database or infrastructure as code | Medium | Low to medium | Infrastructure is the main pain point |
Refactor | Restructure and upgrade the code without changing what it does | Medium | Medium | The business logic is sound but the code is hard to change |
Rearchitect | Change the structure, for example splitting modules or adding an API layer | High | Medium to high | Scaling or integration limits |
Rebuild or replace | Rewrite, or swap for a commercial product | High | High | The system no longer matches how the business works |
Effort and risk are relative guides. They vary with system size and data complexity.
To work out which option applies to a particular system, answer the questions below in order, starting with the cheapest decisions.

If a large system gives different answers for different modules, follow the tree once per module. That is how one platform ends up with a refactored core, a replatformed database and a retired reporting tool.
Retain and retire are easy to overlook. Retiring a system nobody uses frees the budget it was consuming, and AWS notes that you might retain one application because others have to be migrated first.
Replatforming is the least visible option, because users see no change. We went through it ourselves: when our AWS deployments relied on manual changes in the console, our engineers moved them to Terraform infrastructure as code to reduce risk and keep environments consistent. The applications stayed the same; the way we deploy them changed. We wrote it up in from manual AWS deployments to Terraform IaC.
If you are leaning towards replacing a system with an off the shelf product, read custom software vs off the shelf before committing.
How to modernise without stopping the business
A full rewrite has to catch up with a system the business keeps changing while the rewrite is under way, and then everything cuts over at once. If that cutover goes wrong, every team that depends on the system feels it.
The safer pattern is the strangler fig approach. Martin Fowler named it after the strangler figs he saw in the Queensland rainforest, which grow around a host tree until they stand on their own. It works in five steps:
Put an interface, usually an API layer, in front of the old system.
Route one function at a time through the interface to new code.
Run old and new side by side and compare the results.
Move the next function once the first is stable.
Switch off the old system once nothing calls it any more.
Each step can be rolled back, and each is a checkpoint where you can change course. The first build is usually the API layer, the work of our API development and integration team. Our enterprise software work follows the same principle: connect to the systems you already run and modernise in phases, so nothing stops while the new system comes online.
Two parts of the plan need their own budget lines. Data migration should be rehearsed on a copy of production data, with a written rollback plan before go live. Decommissioning needs time and money too, because a legacy platform left running just in case keeps costing money and keeps its old security risks.
Security and compliance in Australia
Unsupported software also shows up in the frameworks your auditors and customers use.
The Australian Signals Directorate's Essential Eight maturity model requires online services that vendors no longer support to be removed, and unsupported operating systems to be replaced. A legacy application on an end of life stack makes those controls hard to meet.
If the system holds personal information, the Privacy Act 1988 and the Notifiable Data Breaches scheme apply. A data breach likely to result in serious harm must be reported to the Office of the Australian Information Commissioner and to the people affected.
Banks, insurers and super funds have extra obligations. APRA's prudential standard CPS 230 Operational Risk Management has applied since 1 July 2025. It requires regulated entities to manage operational risk, maintain business continuity for critical operations and manage material service providers. It sits alongside CPS 234, APRA's standard on information security.
This is general information. Confirm your obligations with your compliance or legal advisers.
Where AI helps, and where it doesn't
AI coding tools help with a slow part of legacy work: reading code nobody documented. They can summarise what a module does, map dependencies, draft tests that record current behaviour before a refactor and handle repetitive upgrade changes.
They can also produce code that looks right and fails on edge cases. Sentia engineer Adrian Yonan wrote about one example in Cursor is breaking your Rails migrations. Legacy systems often have little test coverage, which makes that kind of error harder to catch. Review AI generated changes the way you would review a new contractor's first pull request; our guide to vibe coding reviews explains how we audit AI written code.
Sometimes the goal is a new capability rather than new code. Then AI integration can add document processing or routine decisions to the system you already have, without a rebuild.
Common legacy modernisation mistakes
Rewriting everything at once because the old code is embarrassing. The code may be hard to read, but it holds years of rules nobody wrote down, and a rewrite has to rediscover every one.
Modernising the technology before mapping the process. Teams end up rebuilding workflows nobody wanted to keep.
Underestimating data migration. Records entered inconsistently over many years take longer to move than planned.
Leaving decommissioning out of the budget. The old system keeps running beside the new one.
Treating modernisation as a one off project. Without ongoing upgrades and support, the new system becomes the next legacy system. We covered this in why ongoing support agreements matter.
What legacy modernisation looks like in practice
We take over, maintain and extend Rails applications other teams started, and GoodnessMe Box is a good example. The business runs a monthly subscription for wholesome food boxes and came to us to stabilise its ecommerce platform, which had performance and payment problems during a period of growth.
Our engineers refactored and rebuilt the Ruby on Rails backend, simplified the codebase and removed functionality the business no longer needed. They modernised the ordering and subscription systems, added tracking for customer deliveries, simplified admin workflows and moved payments to a modern gateway built for reliable recurring billing.
In the terms used in this guide, that is a refactor and rebuild of the backend plus the replacement of one critical service. The GoodnessMe Box case study has the details.
Planning your next step
If your system shows several of the warning signs above, start with an assessment before you ask anyone for a rebuild quote. We work with established organisations on legacy systems from our studios in Sydney and Zagreb, and a code review will show you which parts of your system to keep, fix or replace.
Frequently asked questions
- What is a legacy system?
- A legacy system is software the business still relies on that has become hard to change, secure or support. Usual causes are an unsupported technology stack, missing documentation, no automated tests and knowledge held by very few people. Age alone does not make a system legacy.
- What are the 7 Rs of modernisation?
- The AWS version of the 7 Rs is retire, retain, rehost, relocate, repurchase, replatform and refactor. For software modernisation, Sentia uses a close variant: retain, retire, rehost, replatform, refactor, rearchitect, and rebuild or replace.
- How long does legacy system modernisation take?
- It depends on the option and the size of the system. Rehosting is usually quickest because the code does not change. A staged rearchitecture of a core platform runs in phases, and each phase should deliver a working improvement rather than holding everything back until the end.
- How much does legacy system modernisation cost?
- Cost depends on the size and complexity of the codebase, how much data needs migrating and how clean it is, the number of integrations, existing test coverage and any compliance requirements. An assessment comes first because it turns those unknowns into an estimate you can plan around. Sentia estimates every project individually after a free scoping.
- Should we refactor or rebuild a legacy system?
- Refactor when the business logic is still right and the problem is code quality or outdated versions. Rebuild when the system no longer matches how the business operates, or when the cost of change keeps climbing even after cleanup. Many projects mix the two, rebuilding one module while refactoring the rest.
- Can a legacy system be modernised without downtime?
- Downtime can usually be kept to short, planned windows by running old and new components in parallel, moving one function at a time and rehearsing the data migration.
- Can you take over a system another team built?
- Yes. We take over, maintain and extend Rails applications other teams started. We start with a code review so you know what is working, what is at risk and what to fix first.
- What is the difference between legacy modernisation and project rescue?
- Legacy modernisation is for systems that still work but are ageing. Project rescue is for software projects that are failing, stalled or abandoned by the previous developer. Both start with a code review, but the goals differ.