Hortalia now knows which model it wants for each system, how much it costs and what the regulations require. The trickiest part is still to come: taking it into production without stopping the business, and deciding what happens the day it has to change provider. A badly planned migration turns a good decision into an operational disaster; an architecture with no exit plan turns a provider into your company's hostage-taker (or the other way round). In this lesson you will learn the phases of a migration, the strategies known as 6R/7R and how they relate to IaaS, PaaS and SaaS, the tools that exist to carry them out, how to organise waves with cutover windows and rollback, and how to analyse and mitigate vendor lock-in with a real exit plan. We will apply it all to Hortalia: we will classify each system against the Rs, settle whether the ERP should become a SaaS ERP in the medium term, draw up the wave plan around the Christmas peak season and close the two outstanding decisions: Microsoft 365 or Google Workspace and which CRM.
- The four phases of a migration
| Phase | Goal | Deliverables | Typical mistake |
|---|---|---|---|
| 1. Assessment and inventory | Know what you have and what depends on what | An inventory of servers, applications, data, integrations and licenses; measurement of real usage | Migrating what nobody knew existed... or discovering it when it breaks |
| 2. Planning | Decide strategy, order, risks and success criteria | A strategy per application (the Rs), waves, target architecture, budget, test plan and rollback plan | Fixing the date before knowing the dependencies |
| 3. Migration | Execute with the least possible impact | Target environment built (ideally with IaC), data migrated, tests passed, cutover and validation | Cutting over with no dry run and no acceptance criteria |
| 4. Optimisation | Tune cost, performance and operations | Right-sizing, pricing commitments, automation, decommissioning the old kit, documentation | "It's migrated now" and nobody looks at it again; you pay twice for years |
Phase 1 is the one most often underestimated. At Hortalia, the inventory turned up two systems nobody talked about: the file server with the shared spreadsheets and a box-labelling application installed on a PC in the warehouse with a local database (which is decided to be kept for now, because it only works connected to the industrial printer).
- The 6R/7R strategies
These are the possible ways of dealing with each application. The list was born in the AWS world as the "6Rs" and is usually quoted today with seven:
| Strategy | What it involves | Resulting model | Effort | When to use it |
|---|---|---|---|---|
| Retire | Switch off what is no longer used | — | Very low | Forgotten servers and applications; there is always one |
| Retain | Leave it where it is, for now | On-premises | None | Software tied to hardware, contracts still running, systems about to be replaced |
| Rehost (move as-is, lift and shift) | Copy the server to a VM without changing the application | IaaS | Low | Legacy applications that work and cannot be touched |
| Relocate | Move the whole virtualization platform to the cloud | IaaS | Low-medium | Companies with many VMware VMs that want to move the lot |
| Replatform | Small changes to take advantage of managed services (for example, moving the database to a managed service) | IaaS + PaaS | Medium | When a contained change removes operational work |
| Repurchase | Stop maintaining your own solution and buy an equivalent one | SaaS | Medium-high (data and processes) | Commodity processes: email, CRM, HR, standard ERP |
| Refactor | Rewrite the application for the cloud (microservices, serverless, containers) | PaaS | High | Differentiating applications with a long life ahead and a team to do it |
Two practical rules:
- The strategy can change over time. An application can start with rehost (fast, low risk) and later evolve to replatform or repurchase. That is exactly the path of Hortalia's ERP.
- Cost goes up, and so does risk, as you go down the table, but so does the long-term benefit. Migrating everything with rehost leaves you with the same old operations in the cloud (and probably more expensive); refactoring everything at once is a project few companies ever finish.
- Migration tools
Mention them for what they are: aids that reduce manual work, not magic buttons. Always check their availability, requirements and current status in the provider's documentation before planning around them.
| Need | Common tools | What they do |
|---|---|---|
| Discover and inventory servers | Azure Migrate, AWS Application Discovery Service | They detect servers, their usage and network dependencies; they suggest sizes and estimate cost |
| Replicate servers to VMs | Azure Migrate (server migration), AWS Application Migration Service | They replicate disks continuously and allow testing before the final cutover |
| Migrate databases | Azure Database Migration Service, AWS Database Migration Service, native backup and restore | They migrate schema and data, sometimes with continuous replication to shorten the outage |
| Migrate mailboxes | Cutover, staged or hybrid migration to Exchange Online; third-party tools | They copy mailboxes, calendars and contacts while keeping the old server until the cutover |
| Migrate files | Migration Manager / the SharePoint migration tool, AzCopy, Storage Migration Service, rsync | They copy folders preserving permissions (with caveats) and allow successive syncs |
| Migrate bulk data without the network | Physical transfer devices (Data Box or Snowball type) | For terabytes when the line cannot cope |
For Hortalia, with a ~40 GB database and 120 mailboxes, the network is enough: no physical device is needed.
- Waves, cutover window and rollback
Migrating everything at once maximises risk; migrating one system at a time drags out the project and the parallel run. The usual practice is waves (groups of systems migrated together because they share dependencies or users), ordered from lowest to highest risk, with:
- Entry criteria: what has to be ready beforehand (at Hortalia, the second fibre line).
- Dry run: repeating the whole procedure in a test environment and measuring how long it really takes.
- Cutover window: the moment of the real outage, at the time of least impact, with the list of steps timed.
- Acceptance criteria: what is checked to declare success (key users validate real processes: place an order, print a delivery note, issue an invoice).
- Point of no return and rollback plan: up to which step you can go back to the old system, and how. At Hortalia, the old server stays switched off but untouched for 30 days.
- Freeze period: dates when nothing is touched because the business cannot take it. For Hortalia, the Christmas peak season.
- Vendor lock-in: types, measurement and mitigation
Vendor lock-in is the cost of changing provider. It is never zero, and it is not necessarily a bad thing: in exchange for a degree of dependency you get integration, managed services and less work. The mistake is not knowing how much of it you have.
5.1 Types
| Type | What it involves | Example | Mitigation |
|---|---|---|---|
| Technical | You use proprietary services with no direct equivalent | An application built on one provider's specific services | Open standards, containers, standard databases, abstraction layers when they pay off |
| Data | The data is hard to extract or to reuse | A SaaS product that exports incomplete CSVs, with no attachments and no history | Periodic tested exports, open formats, your own copy |
| Contractual | Commitments, minimum terms and penalties | A 3-year reservation, an annual contract with no way to reduce licenses | Short commitments at first, exit and migration-assistance clauses |
| Knowledge | The team only knows how to operate that provider | The whole team certified in a single ecosystem | Training in concepts (not just products), IaC, documentation |
| Process | The company has adapted its processes to the product | Sales processes designed around one particular CRM | Documenting the process, not just the tool |
5.2 How to measure it
A simple and honest approach, system by system: estimate the cost and the timeline of leaving.
| Question | Example (Hortalia's CRM) |
|---|---|
| What would it cost to migrate to an alternative (hours, partner, parallel licenses)? | ~€4,000 and 6 weeks |
| What would be lost along the way? | Automations, reports, formatted activity history |
| How long does it take to get back to normal operations? | 2-4 weeks for the sales team to adapt |
| Is the export tested? | Yes, weekly and tested in 04-05 |
| Indicative index: exit cost / annual cost of the service | 4,000 / 2,560 ≈ 1.6 years |
That index is not an exact science, but it lets you compare: a system whose exit costs the equivalent of more than two or three years of service is a serious dependency worth mitigating or, at the very least, accepting consciously.
5.3 How to mitigate it
- Open standards: PostgreSQL instead of a proprietary database, OCI containers, SAML/OIDC for identity, open file formats.
- Infrastructure as code: the ERP environment described in Terraform (02-05) can be rebuilt on another provider by changing the provider and adapting resources; without IaC, you would have to rediscover everything.
- Tested data export, not just documented: export and restore into an alternative tool at least once a year.
- Exit clauses in the contract: deadlines for returning data, formats, migration assistance, what happens if the provider raises prices or discontinues the service.
- Multicloud with a reason: using two providers "just in case" doubles the work, the knowledge required and sometimes the cost (inter-cloud traffic, teams, tooling). It makes sense when it answers a specific need (a backup outside the main provider, a SaaS product from another vendor), not as generic insurance. Hortalia already applies it that way: backups in Azure and an optional third copy in S3.
- Regulation on your side: the European Data Act introduces obligations to make switching between data processing services easier, including the progressive removal of switching charges. It is a trend that favours the customer; check its current timetable and scope before basing a decision on it.
- The exit plan
An exit plan is a short document per system that answers this: if we had to leave this provider tomorrow, what would we do? It must exist before going into production, while you still have bargaining power.
Minimum contents:
- Data and formats: what data there is, how it is exported, in what format and how often the export is tested.
- Configuration and logic: what does not travel in the export (automations, reports, permissions) and how it is documented.
- Alternatives identified: at least two, with a cost estimate.
- Contractual deadlines: notice period, minimum term, how long the provider keeps the data after termination and when it deletes it.
- Owner and last review.
For Hortalia it looks like this (summary):
| System | Alternatives | Export | Last test | Estimated exit cost |
|---|---|---|---|---|
| ERP on a VM (Azure) | Another IaaS provider (AWS eu-south-2, Google europe-southwest1, a European provider) |
Native SQL Server backups + IaC | Six-monthly recovery drill | €4,000-6,000 and 4-6 weeks |
| Online store (App Service) | Cloud Run, Container Apps, another PaaS | Code in Git, standard PostgreSQL database, photos in object storage | Annual test deployment on another platform | €3,000-5,000 and 3-4 weeks |
| Microsoft 365 | Google Workspace, European alternatives | Mailbox and file export; files in standard formats | Annual | High: 120 users, 8-12 weeks |
| CRM | Pipedrive, Dynamics 365 Sales | Weekly export through the API (tested in 04-05) | Weekly | ~€4,000 and 6 weeks |
- Hortalia: each system against the Rs (and the decision on a SaaS ERP)
| System | Strategy | Destination | Reason |
|---|---|---|---|
| Legacy ERP | Rehost (for now) | IaaS: vm-erp-01 in spaincentral |
A vendor application on .NET Framework; moving it as-is is fast and low risk |
| hortalia-shop online store | Replatform (already done, PaaS-native) | PaaS: App Service + managed PostgreSQL | An in-house, differentiating application; autoscaling handles the peaks |
| Exchange 2016 email | Repurchase | SaaS: Microsoft 365 | Commodity, out of support, frees up 84 h/year of Laura's time |
| Customer spreadsheet | Repurchase | SaaS: CRM | Commodity; the spreadsheet is not an application, it is a problem |
| File server | Repurchase | SaaS: OneDrive and SharePoint | Included in the suite; removes a server and its backups |
| In-house scheduled tasks | Refactor (small) | PaaS: Azure Functions | Already rewritten as functions (03-04) |
| Warehouse labelling application | Retain | On-premises | It depends on a locally connected industrial printer |
| Physical server in the cabinet | Retire | — | It is left empty after the migrations; it is switched off and removed |
7.1 A SaaS ERP in the medium term?
This is the question postponed since SaaS Use Cases. The committee analyses it with illustrative numbers, counting 35 ERP users (admin, purchasing, quality, warehouse, logistics and sales):
| Stay on the VM (rehost) | Replace with a SaaS ERP (repurchase) | |
|---|---|---|
| 5-year cost (illustrative) | ~€56,650 direct (05-02) | Licenses for 35 users × ~€80/month ≈ €33,600/year + implementation €40,000-60,000 → of the order of €200,000 |
| Timeline | Already done | A 9-15 month project involving the whole company |
| In-house processes (batches, expiry dates, routes) | They work today | They need configuration or bespoke development |
| Integrations (stock API, store, CRM) | They exist | They have to be rebuilt |
| Mobile access without a VPN | No (solved with the VPN and Entra ID) | Yes, natively |
| Regulatory updates (e-invoicing) | They depend on the vendor | Included by the provider |
| Technology risk over 5 years | High: .NET Framework and a small vendor | Low |
Decision: not now. The ERP stays on the VM. The cost and the organisational impact of an implementation are not justified while the current ERP does its job. But the decision is not filed away: a review in 2028 is set, along with triggers that would bring it forward:
- The vendor announces end of support or fails to adapt the product to a regulatory obligation (e-invoicing).
- The hours spent on the ERP and its workarounds exceed an agreed threshold.
- The company grows or opens a new line (for example, the B2B portal in 05-06) that the current ERP cannot support.
An immediate practical consequence, already anticipated in 05-02: no 3-year reservation is signed, but a renewable 1-year savings plan instead. And the ERP vendor is asked for its roadmap in writing.
- Hortalia: the wave plan
Constraints agreed with management:
- The second fibre line must be up and running before the ERP is moved (without it, a line failure leaves the warehouse without the ERP).
- Freeze from 27 November 2026 to 7 January 2027: Christmas peak season, no production changes (it matches the store's autoscaling profile defined in 03-04).
- Email is urgent: Exchange 2016 has been out of support since October 2025.
- Each wave ends with validation by key users and a short report to management.
gantt
title Hortalia migration wave plan (fictitious dates)
dateFormat YYYY-MM-DD
axisFormat %d/%m
section Prerequisites
Second fibre line :req1, 2026-10-05, 33d
Azure foundation, identity and MFA :req2, 2026-10-05, 19d
Tags, budgets and alerts :req3, 2026-10-19, 12d
section Wave 1 - Email and files
Microsoft 365 preparation :o1a, 2026-10-19, 12d
Pilot with 10 mailboxes :o1b, 2026-11-02, 5d
Migration of the 120 mailboxes :o1c, 2026-11-09, 12d
section Wave 1 - Online store
Store load test :o1d, 2026-10-13, 11d
Go live on App Service :o1e, 2026-11-09, 5d
Stabilisation and monitoring :o1f, 2026-11-16, 11d
section Freeze
Christmas peak season (no changes) :crit, freeze, 2026-11-27, 42d
section Wave 2 - ERP and CRM
CRM rollout :o2a, 2027-01-12, 25d
ERP testing and cutover rehearsal :o2b, 2027-01-12, 18d
ERP cutover (weekend) :crit, o2c, 2027-02-06, 3d
ERP stabilisation :o2d, 2027-02-08, 12d
Files to OneDrive and SharePoint :o2e, 2027-02-15, 19d
section Wave 3 - Optimisation
Decommission the physical server :o3a, 2027-03-10, 5d
Right-sizing and savings plan :o3b, 2027-03-08, 19d
Recovery drill :o3c, 2027-04-12, 5d
Key points of the plan:
- The fibre line is ordered first (October) because its installation lead time is not up to Hortalia. It is an entry criterion for wave 2, not for wave 1: email and the store are cloud services reachable from anywhere, whereas an ERP in the cloud leaves the warehouse idle if the only line goes down.
- Email goes before the peak season despite the risk, for security reasons: an unsupported mail server is the most serious problem Hortalia has today. It is mitigated with a pilot of 10 mailboxes (management, IT and three sales reps) before moving the other 120.
- The store goes live on App Service in the week of 9 November, after the October load test and with two weeks' margin before the freeze. If the load test or the stabilisation go badly, plan B is to postpone to January and get through the peak season on the current infrastructure.
- The ERP is cut over on a weekend in February, in the low season, with a dry run in January. Procedure: final backup, restore on
vm-erp-01, validation by key users (an order, a delivery note, an invoice, a stock count), change of the internal DNS and of the warehouse VPN. Rollback available until Sunday afternoon: the old server is switched back on, and it stays untouched for 30 days. - The CRM is rolled out in January, not at Christmas: the sales team cannot learn a new tool in the middle of the peak season.
- Optimisation is not optional: right-sizing with real data, taking out the savings plan, decommissioning the physical server (which stops consuming electricity and generating work) and a recovery drill in April.
- Hortalia: email and CRM are settled
9.1 Microsoft 365 versus Google Workspace
| Criterion | Microsoft 365 | Google Workspace |
|---|---|---|
| 5-year cost (05-02, illustrative) | €116,520 | €118,550 (includes desktop Office for 15 seats) |
| Identity | Entra ID, already used for Azure, the VPN and Conditional Access | Its own identity; federatable, but with two identity directories |
| Office suite | Desktop Excel, which admin staff use daily with the ERP reports | Browser-based spreadsheets; Office would be bought separately |
| Migration effort | Lower: from Exchange 2016 to Exchange Online, a very well-trodden path with native tools | Higher: a change of email client, complete retraining |
| Mobile management and security | Intune and Defender included in Business Premium | Management included in higher plans |
| Lock-in | High concentration: Azure + M365 + Entra ID with a single vendor | It diversifies away from Azure, but adds a second ecosystem to administer |
Decision: Microsoft 365 (45 Business Premium + 75 F3), for single identity with Entra ID, the dependency on desktop Excel, lower migration effort and risk, and equivalent cost. The committee explicitly acknowledges the concentration risk of a single vendor and mitigates it like this:
- Data in standard formats: office documents are saved in open, documented formats; mailboxes can be exported.
- The CRM is bought from a different vendor (section 9.2), so that the sales information does not sit in the same place as everything else.
- Third-party backup of email and OneDrive, outside Microsoft 365 itself.
- An exit plan with an identified alternative (Google Workspace) and an annual contract review.
- No commitments longer than one year in the first period.
9.2 The CRM
| Criterion | HubSpot (entry paid plan) | Pipedrive | Dynamics 365 Sales |
|---|---|---|---|
| 5-year cost (05-02, illustrative) | €14,800 | €19,700 | €45,100 |
| Adoption in the prototype | Tested by Jordi and two sales reps (04-05), well received | Not tested | Not tested |
| Integration with Microsoft 365 | Outlook extension; API | Good | Native and deep |
| Integration with the ERP and the store | Through the API and functions (tested in 04-04) | Through the API | Native with Power Platform |
| Portability | Full export through the API, tested weekly | Standard export | Standard export; greater dependency on the ecosystem |
| Risks | Advanced features (SSO, fine-grained permissions, automations) in higher plans, considerably more expensive | Fewer features outside sales | Complex and expensive implementation for 9 users |
Decision: HubSpot, moving from the free plan to the entry paid plan for 9 users, with these conditions:
- MFA required for all users while SSO is not included in the plan taken out; the cost of the plan that includes it will be reviewed at the annual review (the "SSO tax").
- Weekly export through the API to immutable Azure storage, already up and running.
- An annual contract, not a multi-year one, while the team settles into its way of working.
- Business owner: Jordi; technical administration: Laura.
And one observation from the committee that holds for the whole module: the choice is not to concentrate everything with a single vendor, even though Dynamics 365 would fit better technically. Diversifying has a cost (two admin consoles, two contracts, API integrations) and here it is considered a reasonable price for reducing lock-in and for respecting the tool the sales team has already adopted.
Common Mistakes and Tips
- Migrating without an inventory. Whatever is not in the inventory will show up at the worst possible moment.
- Doing lift and shift on everything and calling it modernisation. Moving the problem to the cloud often makes it more expensive.
- Refactoring everything at once. Big rewrite projects are the ones that fail most; move forward in stages.
- Forgetting the parallel run. For weeks you will be paying for both platforms: put it in the budget and shorten the overlap.
- Cutting over with no dry run and no rollback. The dry run measures the real time; the rollback saves your Monday.
- Switching off the old system too soon (or never switching it off). Set a deadline, stick to it and document the decommissioning.
- Believing lock-in can be eliminated. It is managed: measured, mitigated and consciously accepted.
- Multicloud as generic insurance. It doubles costs and knowledge; use it when it answers a specific need.
- Tip: write the exit plan the same day you sign the contract, not the day you want to leave.
Exercises
Exercise 1. Classify these against the 7Rs: a) a time-and-attendance application that stopped being used two years ago and is still switched on; b) a reporting server that will be replaced by a SaaS BI product; c) an in-house PHP web application that works well and will be moved unchanged to a VM; d) an in-house MySQL database that will be moved to a managed service without touching the application; e) a control system for a packing line connected to PLCs in the warehouse.
Exercise 2. Management proposes bringing the ERP cutover forward to 20 November 2026 "so we start the new year already migrated". List at least four arguments for rejecting it and propose what can be brought forward.
Exercise 3. Calculate the indicative lock-in index (exit cost / annual cost) for the store on PaaS with the data from this lesson and from 05-02 (exit cost €3,000-5,000; annual cost of the service, excluding Marc's hours, €2,480) and comment on the result. What would you do to reduce it?
Solutions
Solution 1. a) Retire: switch it off (with notice, and keeping a copy of its data for a while). b) Repurchase. c) Rehost. d) Replatform. e) Retain: it depends on local industrial hardware and its latency; it stays where it is (and, if anything, connects to the cloud only to send data). Common mistake: marking (a) as "retain" out of fear; a server that is switched on and nobody uses is cost and attack surface.
Solution 2. Arguments: 1) it clashes with the peak season freeze, which starts on 27 November, leaving barely a week to stabilise; 2) the second fibre line might not be up and running, and without it the warehouse is left with no ERP at the first failure; 3) it coincides with the migration of the 120 mailboxes, with Laura as the only technical resource: two critical cutovers at once; 4) there would be no time for the full dry run or for validation by key users; 5) November is a high-activity sales month, the exact opposite of the "low season" criterion. What can be brought forward: building the environment with IaC, the test restore, the cutover rehearsal and training the key users, so that in February the cutover is mechanical. Tip: always offer an alternative; a bare "no" rarely convinces management.
Solution 3. Index = 3,000/2,480 ≈ 1.2 years to 5,000/2,480 ≈ 2.0 years. That is moderate lock-in, reasonable for a PaaS platform: the application is standard Python, the database is PostgreSQL and the code is in Git, so what has to be rebuilt is deployment, autoscaling, private networking, secrets and monitoring. To reduce it: package the application in a container (runnable on App Service, Cloud Run or Container Apps), avoid proprietary services in the code unless behind a layer of your own, keep the infrastructure in IaC and do a test deployment on another platform once a year. Common mistake: believing the index is an absolute truth; its value lies in comparing systems and in forcing you to estimate the exit cost.
Conclusion
In this lesson you have walked through a complete migration: the four phases (assessment, planning, migration and optimisation), the 7R strategies and how they relate to the models (rehost → IaaS, replatform and refactor → PaaS, repurchase → SaaS, plus retire, retain and relocate), the tools that help you carry them out and the mechanics of waves: entry criteria, dry run, cutover window, acceptance criteria, rollback and freeze periods. You have learned to analyse vendor lock-in by type (technical, data, contractual, knowledge and process), to measure it with a simple index (exit cost against annual cost) and to mitigate it with open standards, containers, IaC, tested exports, exit clauses and multicloud with a reason, all of it captured in an exit plan per system. Hortalia has classified each system against the Rs, has decided not to replace the ERP with a SaaS product now (with a review in 2028 and explicit triggers, which is why it only takes a one-year savings plan), has planned three waves between October 2026 and April 2027 respecting the fibre line and the Christmas peak season, and has closed the two outstanding decisions: Microsoft 365 for email, with explicit measures against concentration with a single vendor, and HubSpot as the CRM, with an annual contract, MFA and a tested weekly export.
All these decisions belong to one particular company. What have others done, with more resources and more years of experience? In the next lesson, Case Studies: Companies Using IaaS, PaaS, and SaaS, we will analyse real, publicly known cases — including those of companies that decided to leave the cloud — and draw from each one the lesson Hortalia can use and the one that does not apply to it because of its size.
