Pre-launch: quote requests are open; self-serve checkout is not open yet. Request a quote

Guide: migration

Cloud migration planning: from inventory to a cutover you can roll back

Most migrations fail on the things nobody wrote down: a forgotten cron job, a DNS record with a one-day TTL, a database that takes longer to restore than the window allows. This guide turns those into numbers and checklists before the move.

By the BroadNet Cloud teamPublished 13 min read

  • Transfer timebytes x 8 / (link bps x efficiency)
  • Typical efficiency0.6-0.8 of line rate over the internet (assumption)
  • DNS ruleLower TTL at least one old TTL before cutover
  • Default strategyRehost first, improve after
  • ToolMigration capacity calculator
Illustrative campaign art: a glowing doorway opening onto a simpler cloud landscape
Illustration
Short answer

A safe migration has five parts: a complete inventory with dependencies, a strategy per workload (usually rehost or replatform), transfer times calculated as bytes x 8 / (link speed x efficiency), DNS TTLs lowered at least one old-TTL period before cutover, and a written runbook with go/no-go and rollback criteria agreed before the window opens.

Assumptions and when this guide does not apply

This guide assumes you are moving a small-to-medium estate: one to a few dozen servers or virtual machines, a handful of databases, some object or file storage and public DNS you control. The target can be a VPS, cloud, managed hosting or bare metal; the method is the same.

It does not fully cover these cases:

  • Petabyte-scale data. At that size, network transfer can take weeks and physical transfer appliances or staged seeding are usually cheaper and faster. The arithmetic below will tell you when you have crossed that line.
  • Regulated data with residency rules. Legal review of where data may sit and travel comes first; this guide only covers the mechanics.
  • Active-active multi-region systems already built for zero-downtime moves. You will use their own failover procedures instead of a cutover window.

All throughput figures in the examples are stated assumptions, not measurements of any provider. Measure your own link before you plan a window.

Step 1: build an inventory you would bet the window on

An inventory is not a list of hostnames. For each workload you need enough detail to rebuild it from scratch if the copy fails. Pull it from three sources and reconcile them, because each one misses things the others catch: what the team believes runs, what the servers report (process lists, listening ports, installed packages, scheduled jobs), and what the network shows (flow logs or connection tables over at least one full business cycle, including month-end jobs).

Minimum inventory fields per workload
FieldWhy it matters at cutoverWhere to find it
OS, version, kernelDecides whether you can copy the image or must rebuild/etc/os-release, uname -r
CPU, RAM, disk used and provisionedTarget sizing and transfer volumeMonitoring history, df -h, free -m
Data volume and daily change rateInitial sync time and final delta timeBackup reports, disk growth graphs
Listening ports and inbound clientsFirewall rules and who will notice an outagess -tlnp, load balancer logs
Outbound dependenciesAllow-lists at third parties that pin your old IPFlow logs, application config
Scheduled jobsJobs that must run exactly once, not on both sidescrontab -l for every user, systemd timers
Certificates and secretsExpiry during the move; where private keys liveWeb server config, secret store
DNS records and TTLsHow long clients keep the old addressZone export from your DNS host
Owner and business hoursWho signs off go/no-go; when an outage hurtsInterviews

Outbound dependencies are the most often missed item. Payment gateways, SMS and email providers, partner APIs and database firewalls frequently allow-list your current public IP. If the new environment sends from a different address, those calls fail after cutover even though everything looks healthy from inside. List every one and request the new IPs in advance.

Step 2: map dependencies and group into move waves

Draw which workload talks to which, with the protocol and direction. The goal is to find groups that must move together because splitting them would put a slow or metered link in the middle of a chatty conversation. A web tier that makes 40 database queries per page will feel fine on a local network and painful across the internet: at an assumed 20 ms round trip, 40 sequential queries add 800 ms to every page.

Group workloads into waves. A good first wave is low risk but exercises the whole process (staging, an internal tool, a static site), proving the network path, DNS steps and runbook. Put the systems with the most inbound clients and the strictest downtime tolerance in later waves, when the team has rehearsed.

Never split an application from its primary database across sites unless you have measured the latency effect. Move them in the same wave, or replicate the database first so the application can switch to a local copy.

Step 3: choose rehost, replatform or something else per workload

Cloud providers describe migration strategies as the "7 Rs". You do not need all seven for a small estate, but naming the choice for each workload stops scope creep in the middle of a move.

Migration strategies and when each fits
StrategyWhat changesFits whenMain risk
Rehost (lift and shift)Same OS and app, new hostDeadline-driven moves, stable apps, unclear futureCarries old problems and oversizing with it
ReplatformSmall changes: newer OS, managed database, containersThe OS is near end of life, or a managed service removes real toilTwo changes at once make faults harder to isolate
RefactorApplication architectureThe app must scale or change in ways it cannot todayBecomes a development project with its own timeline
RelocateHypervisor-level move of whole VMsBoth sides run compatible virtualizationTooling lock-in, large image transfers
RepurchaseReplace with a SaaS productCommodity function such as email or ticketingData export and feature gaps
RetainNothing, for nowHard dependency or contract keeps it in placeHybrid links you must now run
RetireSwitched offInventory shows no users or trafficA once-a-year job you did not see

The practical default for small teams is rehost first, replatform after. Moving and changing in the same window doubles the number of things that can break and makes rollback harder, because the old environment no longer matches the new one. The exception is an OS at or near end of support: copying an unsupported OS to a new host only moves the problem, so rebuild on a supported release and redeploy the application.

Step 4: calculate data transfer time before you pick a window

Transfer time is arithmetic, and it is the number that most often makes a planned window impossible. The formula:

time (seconds) = bytes x 8 / (link speed in bits per second x efficiency)

Efficiency covers protocol overhead, TCP behavior over distance, encryption cost, disk read speed at the source and write speed at the target, and the fact that you rarely get the whole link. For transfers across the public internet, an efficiency between 0.6 and 0.8 is a reasonable planning assumption; measure it with a test copy of a few gigabytes over the real path before relying on it. Use decimal units consistently: 1 TB = 10^12 bytes, 1 Gbps = 10^9 bits per second.

Worked example: initial sync

Assumptions: 2 TB of data, a 1 Gbps link, 0.7 efficiency.

2 x 10^12 bytes x 8 = 1.6 x 10^13 bits.

Effective rate = 10^9 x 0.7 = 7 x 10^8 bits per second.

1.6 x 10^13 / 7 x 10^8 = 22,857 seconds, about 6 hours 21 minutes.

The same 2 TB over a 200 Mbps link at the same efficiency takes 1.6 x 10^13 / 1.4 x 10^8 = 114,286 seconds, about 31.7 hours. That cannot fit in an overnight window, so it must be pre-seeded.

The answer to a long initial sync is not a longer outage: copy the bulk while the old system is live, then copy only the changes in the window.

Worked example: final delta

Assumptions: the same 2 TB data set changes by 3 % per day, and the last full sync finished 24 hours before cutover.

Delta = 2 TB x 0.03 = 60 GB = 6 x 10^10 bytes.

6 x 10^10 x 8 / 7 x 10^8 = 686 seconds, about 11.4 minutes at 1 Gbps and 0.7 efficiency.

Run a second incremental pass an hour before the window and the final delta shrinks again. With millions of small files, rsync's metadata scan can dominate, so time a dry run.

Enter your own volumes, link speed and change rate in the migration capacity calculator to get the initial sync, final delta and the window you need, with a margin for verification.

Step 5: lower DNS TTLs early enough to matter

A DNS record's TTL tells resolvers how many seconds they may cache the answer (RFC 1035). If your A record has a TTL of 86,400 seconds (one day), a resolver that looked it up a minute before cutover can keep sending users to the old address for almost a day after you change it.

The rule: lower the TTL at least one full old-TTL period before cutover. If the current TTL is 86,400 seconds, set the new low value (for example 300 seconds) at least 24 hours before the change, and preferably 48 hours to absorb mistakes. After that, every cached copy has expired and been refetched with the short TTL, so the switch propagates in minutes.

Worked example: TTL timeline

Assumptions: current TTL 86,400 s, cutover Saturday 02:00, target TTL 300 s.

  1. Thursday 02:00 or earlier. Lower TTL to 300 s. Worst-case caches still hold the old long TTL until Friday 02:00.
  2. Saturday 02:00. Change the record. Resolvers that respect TTL move within about 5 minutes.
  3. Saturday 02:00 to Sunday. Keep the old server answering, or redirecting, for stragglers.
  4. After a stable week. Raise TTL again, for example to 3,600 s, to reduce query load and exposure to resolver faults.

Three caveats. Some resolvers and runtimes apply their own cache limits, so expect a tail of old traffic. Records you are creating rather than changing are subject to negative caching, controlled by the SOA record's minimum field (RFC 2308), so a lookup for a name that did not exist yet can be cached as "does not exist". And if you are also moving the DNS hosting itself, the NS records at the registry have their own TTL, often long, which you cannot shorten on the parent side; move DNS hosting in a separate, earlier change.

Step 6: move databases by replication, or by dump and restore

There are two ways to move a database, and the choice is about how much downtime you can accept.

Database move methods compared
MethodDowntime driverGood forWatch out for
Dump and restoreDump + transfer + restore + index build, all inside the windowSmall databases, version upgrades, simple setupsRestore and index rebuild often take longer than the dump
Physical replication (streaming)Stop writes, let the replica catch up, promoteSame major version, whole-instance movesNeeds matching versions and network access between sites
Logical replicationStop writes, catch up, fix sequences, switchVersion upgrades with short downtime, partial movesSchema changes and sequences are not replicated in PostgreSQL

Worked example: is dump and restore fast enough?

Assumptions: 200 GB database, end-to-end dump-transfer-restore throughput of 50 MB/s measured in a rehearsal, plus index builds that took 40 minutes in the same rehearsal.

200,000 MB / 50 MB/s = 4,000 s, about 67 minutes. Add 40 minutes of index builds: about 1 hour 47 minutes of downtime before testing even starts. If the business accepts a 2-hour window in total, this leaves almost no time to verify or roll back, so replication is the safer choice.

With replication, the outage shrinks to the time it takes to stop writes, confirm the replica has applied everything (replication lag at zero), promote it and repoint the application. In PostgreSQL logical replication, the official documentation lists restrictions that bite at cutover: DDL is not replicated, so freeze schema changes during the migration; sequence values are not replicated, so set every sequence on the target above the current maximum before you open it for writes; and large objects are not replicated at all. For MySQL, check binary log format and GTID settings in its manual.

Never allow writes on both the old and new database at the same time unless the system was designed for it. Split-brain writes are the hardest migration fault to undo, because there is no single correct copy left.

Step 7: write a cutover runbook with rollback criteria

A runbook is a timed list of steps, each with an owner, a check and the decision that follows. Rehearse it on staging and agree rollback criteria with the business owner in advance, so nobody argues at 03:00 about "good enough".

  1. T-48 h: freeze. TTLs lowered, schema and config changes frozen, final rehearsal done, outbound IP allow-lists updated at third parties.
  2. T-1 h: last incremental sync. Record its duration to predict the final delta.
  3. T-0: go/no-go call. Named people confirm backups of the old system are fresh and restorable, the target passed smoke tests, and rollback steps are ready.
  4. Stop writes. Maintenance page or read-only mode; disable scheduled jobs on the old side.
  5. Final sync and database switch. Confirm replication lag is zero or the restore completed; fix sequences.
  6. Switch traffic. Change DNS or load balancer targets.
  7. Validate. Run the checklist below against the new environment from outside your network.
  8. Decision point. Declare success or roll back, using the criteria agreed in advance.
  9. Re-enable jobs on the new side only.

Rollback criteria should be measurable. Examples: error rate on key pages above an agreed level for 15 minutes; any failed payment or order write; login failure for a test account; data checks (row counts, checksums) not matching. Set a point of no return: the moment after which new writes land only in the new system and rollback would mean losing or hand-merging them. Before that point, rollback is "point DNS back and re-enable the old side". After it, rollback needs a reverse sync, so plan it or accept that you will fix forward.

Keep the old environment intact and runnable, but not accepting writes, for an agreed period after cutover, typically one to four weeks. It is your rollback path and your reference copy if data questions come up later.

Validation checklist

Run these from outside your network before declaring success.

  • DNS answers with the new address from at least two public resolvers (dig @1.1.1.1, dig @8.8.8.8).
  • TLS certificate is valid for every hostname, with the full chain, and not close to expiry.
  • Key user journeys work end to end: sign-in, search, checkout or form submit, password reset email.
  • Writes land in the new database, and none reach the old one.
  • Row counts and checksums match for critical tables between the final source snapshot and the target.
  • Outbound calls to payment, email, SMS and partner APIs succeed from the new IPs.
  • Scheduled jobs are enabled on the new side and disabled on the old side.
  • Backups run on the new environment, and one test restore has succeeded.
  • Monitoring and alerting point at the new hosts, and a test alert reached a human.
  • Logs are flowing to wherever you keep them, with the right retention.
  • Error rates and response times are within the ranges you recorded before the move.

Post-cutover tasks

The migration is not finished when traffic moves. In the following weeks:

  • Right-size. Compare the first two weeks of real usage with what you provisioned. Rehosted servers are often oversized because they were sized for old hardware.
  • Raise TTLs back to a normal value once you are sure you will not roll back.
  • Decommission deliberately. Take a final backup of the old system, keep it for the retention period you agreed, then wipe and cancel. Remove old IPs from allow-lists and firewall rules.
  • Review costs against the estimate with the first full invoice; see the hosting TCO guide.

Common mistakes

  • Lowering TTL on the day of cutover. It has no effect on answers already cached with the old long TTL.
  • Planning the window from the dump time only. Restore and index builds usually take longer than the dump.
  • Using line rate in transfer estimates. A 1 Gbps port does not move 125 MB/s end to end across the internet; measure efficiency.
  • Running cron jobs on both sides. Invoices, emails or billing runs fire twice.
  • Forgetting outbound allow-lists. Payments and partner APIs fail even though the site loads.
  • Deleting the old environment too soon. It is your rollback path.
  • No backup test on the new side. See the backup and recovery guide.

Frequently asked questions

How long should a migration cutover window be?

Add the final data delta transfer, the database switch, validation time and a rollback allowance. Work it out with the migration capacity calculator; if rollback time does not fit, the window is too short.

What TTL should I use during a migration?

A low value such as 300 seconds is common. What matters more is timing: set it at least one full old-TTL period before the change, and raise it again once the move is stable.

Can I migrate with zero downtime?

Close to it, if the application can run read-only briefly, the database is replicated, and DNS or a load balancer switches traffic. True zero downtime usually needs the application to tolerate two backends, which most small systems do not.

When is network transfer too slow?

When the initial sync takes longer than you can wait, or the daily change rate is close to what the link can carry, so the copy never catches up. At that point, use physical transfer or seed from backups.

How long should I keep the old server?

Long enough to cover your rollback period and any month-end or quarter-end jobs that only run occasionally. One to four weeks is a common range; agree it with the business owner in the runbook.

Sources

  1. Migration strategies (the 7 Rs), Amazon Web Services
  2. Cloud Adoption Framework: Migrate, Microsoft
  3. RFC 1035: Domain Names - Implementation and Specification, IETF
  4. RFC 2308: Negative Caching of DNS Queries, IETF
  5. PostgreSQL logical replication, PostgreSQL Global Development Group
  6. PostgreSQL logical replication restrictions, PostgreSQL Global Development Group
  7. MySQL 8.4 Reference Manual: Replication, Oracle

Want this applied to your workload?

Send us your numbers and we will reply with a written configuration and quote.