Bryan

Bryan Β· Delivery & Offshore Teams Expert Β· December 1, 2026

How to Migrate to a New Server Without Downtime in 5 Steps

Cover image reading Server migration without downtime beside a slide listing read-only mode, a transaction freeze, a database backup for the new server and a DNS record update

Key takeaways

  • β†’Build the new server on the same application, language runtime and database versions as the one in production. Mismatched versions are the most common reason a migration goes wrong, and they surface at the worst possible moment.
  • β†’The database is only half the data. Copy the filestore directory as well, or the new system will look complete until somebody opens an invoice.
  • β†’Restore everything on the new server days early and use it as a rehearsal: log in, run the reports, open the custom modules, trigger every integration, fix what breaks while the old server is still serving users.
  • β†’Lower the DNS TTL well before the cutover. A record that resolvers cached for hours is what turns a few planned minutes of downtime into an afternoon of it.
  • β†’After traffic moves, check the parts no user will report: scheduled actions, email queues, API triggers and external integrations. Keep the old server running for a few days as a rollback.

Sooner or later the server your business runs on has to be replaced. The hosting contract ends, the hardware ages out, the database outgrows the box, or the monthly bill stops making sense. The work is unglamorous, and it usually lands on one developer with the instruction to get it done over a weekend.

Migrations go wrong right at that instruction. Squeezed into one session, the move means restoring a database you have never restored before, onto a stack you have never run before, while the clock ticks and the business waits. Spread out properly, nearly all of the same move happens in advance, so the only part your users could notice lasts a few minutes.

Our worked example is a self-hosted business application, an Odoo instance on PostgreSQL with a filestore on disk. The details of your stack will differ. The sequence won't, since what keeps a migration safe is the order of operations, not the software being moved.

Step 1: build the new server on the versions you already run

Install exactly the application version, the language runtime version and the database version that production runs today. Not the newest release of each. The same one.

Version mismatches are the number one cause of migration problems, and they are nasty because they rarely announce themselves early. A dump taken from one major release of PostgreSQL may refuse to load into another, or load and then behave differently under a query nobody thought to test. An application version a step ahead expects schema changes your dump does not carry. A different Python release pulls different dependency versions behind it. Each of these is survivable on a Tuesday afternoon and miserable at 2am during a cutover.

This is also the moment to resist the obvious temptation. If the version in production is two years old, moving servers feels like the natural time to upgrade as well. It is not. A move and an upgrade are two separate changes, and running them together means that when something breaks you cannot tell which one caused it. Migrate on identical versions, confirm the new server is stable, then upgrade as its own project with its own test run.

If you are commissioning this work instead of doing it yourself, ask for the version numbers in writing before anything is provisioned, with both sides listed side by side. A developer needs two minutes to produce it. It is the single highest-value page in the whole plan.

Slide headed Server Setup with three checkbox items listed below it: Same Odoo Version, Same Python Version, Same PostgreSQL Ver, over a blurred photograph of hands on a laptop keyboard
Version parity is the first checklist, and it is checked against production, not against the latest release.

Step 2: size the new machine for the load you actually have

Matching software versions is not the same as matching the hardware spec. Since you are provisioning from scratch anyway, a migration is the one moment when changing the shape of the machine costs nothing extra. Use it well.

Start by looking at what the current server does under real load rather than at the spec sheet it was bought on. Per-core CPU use during the busy hour, memory headroom when the heaviest reports run, disk throughput while the database is working. If the old server has been struggling, carrying the same spec across carries the problem across with it, and you will have spent a weekend to arrive back where you started.

Three levers are worth pulling when the numbers justify it:

  • More CPU. This is the lever that counts when reports, exports and scheduled jobs queue behind one another.
  • More RAM. A database with enough memory to keep its working set cached behaves like a different product from one that does not.
  • Faster storage. That means NVMe SSDs instead of older disks or network-attached volumes. On a database-backed application, people often feel this change first.

What not to do is treat the rebuild as a redesign. Change the capacity, keep the stack. A new operating system, a new web server and a new database host in the same weekend is three migrations wearing one name.

Close-up of a server monitoring display showing per-core rows labelled cpu2, cpu4, cpu6 and cpu8 with green utilization bars, percentage figures of 33 percent, 33 percent and 21 percent, and clock speeds in MHz
Size the replacement from what the current machine does under load, not from the spec it was ordered on.

Step 3: copy the data early and use it as a rehearsal

Long before the cutover date, put a full copy of production on the new server and run it. This step turns a plan into something you have actually watched work.

  1. Take a full database backup. The whole database, not a selection of tables.
  2. Copy the filestore directory. The filestore sits apart from the database, and of the whole migration it is the piece people forget most often. Attachments, invoices, product images and documents all live there. The database keeps the references, while the files themselves stay on disk. If you restore one without the other, the system looks complete right up to the moment someone opens an invoice and finds nothing attached to it.
  3. Restore the backup on the new server and start the application. A failed restore means you have hit a version problem from step 1, and you have hit it on a day when nothing is at stake.
  4. Use it like a user would. Log in. Run the reports that people really run at month end, and open every custom module. Trigger each integration, then check that the other side received something.
  5. Fix what breaks, now. That is the entire point: while you do this, the old server is still serving everyone.

When the schedule slips, teams cut this rehearsal first, yet it is the only step that shows whether the rest of the plan is real. A problem found here costs a quiet afternoon. Found during the cutover, the same problem costs an outage in front of customers, with no good way back. If your team already keeps a staging environment, the habit and the tooling are already there, so the rehearsal costs you almost nothing.

Two labelled items on a dark blue graphic of scattered file icons: Full Database Backup and Copy Filestore directory, each with a download icon
Two artifacts move, not one. The database carries the records; the filestore carries the files they point at.

Step 4: cut over inside a window measured in minutes

One preparation has to happen days ahead of the cutover itself: lower the TTL on the DNS record that points at your server. TTL is how long resolvers around the internet are allowed to keep serving the answer they already have. Left at its usual value, a portion of your users keeps landing on the old server for hours after you have switched. Lowered in advance, the change propagates in minutes.

Once that is done, book a short maintenance window at an hour that is genuinely quiet for your business and work through the list.

  1. Freeze writes. Switch the old server to read-only mode, or stop it accepting new transactions. Reading still works, but nothing new gets created. This is not ceremony. Any record written after your final backup is a record that disappears.
  2. Take the final database backup. With nothing changing underneath it any more, this dump is the complete truth.
  3. Restore it on the new server and sync the delta. Copy over the files added to the filestore since the rehearsal. The delta is small, and that is exactly why the window stays short.
  4. Point DNS at the new server. Log in to the domain registrar, open the DNS manager and update the record. Because the TTL is already lowered, traffic begins reaching the new machine within minutes.

Almost nothing happens inside the window, which is why it is short. The install, the restore, the testing and the fixing were all done days earlier. All that remains is a final dump, a small file copy and a DNS edit. That is the whole reason this approach produces downtime users do not notice.

Cutover slide with an old server icon next to four bullet points, Read only mode, Transaction temporarily closed, Database Backup for new server and Update DNS to point to the new server, plus a parenthetical note that reads Login to Domain registrar, DNS Manager, Update CNAME Record, and on the right a new server rack marked with a green check
The live window in four moves: freeze, final backup, delta sync, DNS.

Step 5: verify what nobody watches, then keep the old server

As soon as traffic is reaching the new machine, the obvious checks take two minutes: log in, load the main screens, check that the application responds. Those will pass. After a migration, the failures that hurt sit in the parts of the system with no user to complain on their behalf.

  • Scheduled actions. Jobs that run on a timer rather than on a click. When they stop, nothing errors in front of anybody; the problem shows up weeks later as a report that was never generated.
  • Email queues. Outbound mail normally waits in a queue before it leaves. If the mail relay is configured differently on the new host, it fails quietly, which is the worst way for invoices and order confirmations to fail.
  • System alerts. The notifications you count on to hear about trouble are part of what just moved, too.
  • User workflows. Push one real transaction end to end instead of checking that every screen loads.
  • API triggers and external integrations. Whatever talks to a payment processor, a shipping service or an accounting tool points at a hostname or address that may have just changed. It may also be allowed through a firewall list that does not yet include the new server.

After that, keep the old server running for a few days. It stays powered on, serves nothing and costs you a few days of hosting. If something surfaces on day three, it is your rollback, and it is the cheapest insurance in the entire project. Only shut it down once the new server has gone through several days of ordinary use and every scheduled job has had at least one chance to run.

Running a checklist once covers the first hour. Beyond that, standing monitoring on the new server does the job properly and keeps at it through the weeks when nobody thinks about the migration any more.

Post-migration checklist panel on a dashboard with rows for Scheduled Actions, Email Queues, System Alerts, User Workflows and API Triggers, each marked with a blue check mark
The post-cutover list is deliberately unglamorous: background jobs, queues and integrations.

Mistakes that turn a clean migration into an outage

Most migrations that fail do so in the same handful of ways. Every one of them is cheap to avoid.

  • Mismatched versions. By some distance, the most common cause. Before anything else happens, compare the application, runtime and database versions on both servers.
  • Forgetting the filestore. The database restores cleanly and the application starts. Everyone celebrates, and the attachments are gone.
  • Leaving the DNS TTL high. From where you sit the switch is instant, but for a share of your users it takes hours, and they spend that time writing into a database you have already stopped backing up.
  • Skipping the rehearsal. If your first restore happens during the maintenance window, you discover every problem with an audience.
  • Taking the final backup while writes are still happening. Anything saved between the dump and the switch vanishes. Nobody notices until a customer asks about an order they placed yesterday.
  • Decommissioning the old server immediately. Cancel it that same afternoon and you save a trivial amount of money while removing the only rollback you have.
  • Bundling an upgrade into the move. You get two changes at once, one broken system and no way to tell which change broke it.

Check what stuck

6 questions on the brief you just read. Pick one answer per question.

  1. 1. Which versions should you install on the new server?

  2. 2. What does the filestore directory hold?

  3. 3. Why lower the DNS TTL days before the cutover?

  4. 4. What is the point of restoring the backup on the new server before cutover day?

  5. 5. Why put the old server into read-only mode before taking the final backup?

  6. 6. After traffic moves to the new server, which checks are the ones no user will report for you?

Score: 0 / 6

Plan it in advance and the cutover is boring

Done well, a migration is anticlimactic. Match the versions, size the new machine from real numbers, copy the data early and rehearse the whole thing. Then spend a few quiet minutes freezing writes, syncing the delta and moving DNS. Check the background jobs and keep the old server warm for a few days, and the Monday after will feel like any other Monday.

The parts that bite are infrastructure-shaped rather than application-shaped: backups and restores, DNS, file permissions, cron, mail relays, firewall rules. A developer who builds features inside your application is not automatically the person who should move the server underneath it. If nobody on the team owns that layer, it is a specific hire: a DevOps engineer to plan and run the move, or an SRE if what you actually need is someone to own the thing once it is running.

Frequently asked questions

How long is the downtime, realistically?

The part users can notice is the read-only window: the final backup, the delta file copy and the DNS change. When the rehearsal already happened and the TTL was lowered days earlier, that is a matter of minutes. How many depends on the size of your database and how much changed since the rehearsal. The reason it stays short is structural rather than lucky: everything slow, the provisioning, the first restore and the testing, happened earlier in the week on a server nobody was using.

Can we upgrade to a newer version at the same time?

You can, but you will lose the property that makes this approach safe. With identical versions, a failure during the cutover has one plausible cause and one obvious fix: go back to the old server. Bundle an upgrade in, and a failure now has two possible causes that look identical from the outside. Move first. Once the new server proves stable under real traffic, run the upgrade as its own project, with its own rehearsal.

Do we need a maintenance window at all?

With this approach, yes, though a short one. The write freeze is what guarantees the final backup holds everything, and that in turn guarantees nothing is lost. Some approaches skip the freeze by replicating the database live to the new server and switching over once the two are in step. They are, however, a considerably bigger engineering project than a single server move usually justifies. For most teams, the cheaper trade is a few read-only minutes at a quiet hour.

Should our own developer run the migration, or do we need a specialist?

That depends on what your developer really does. This work calls for infrastructure skills: backup and restore, DNS records and propagation, file permissions, cron, mail relays, firewall rules. A person who writes application features all day may never have touched any of them, and a migration is a poor place to learn. When the application is core to how the business runs, hand the move to someone who has done one before, and have them write down the rollback plan before they start.

Ready to hire?

Vetted talent ready for US teams. No recruitment fees. Zero risk.

πŸ‡ΊπŸ‡Έ Trusted by companies across the United States