Skip to content

Cloud Migration With Zero Downtime

Blog 3 min read

A cloud migration runbook with no visible downtime: inventory, lower the TTL, sync, test on the new host, cut over DNS and keep a rollback.

A migration without downtime is a routine, not a trick. You build the new server beside the old one, test it before anyone is sent there, move DNS at a quiet hour and leave the old server running until the new one has proven itself. The steps below fit a typical web stack: files, a database, a certificate and some email.

Runbook

  1. Inventory. List the web server and PHP versions, databases, cron jobs, mail, DNS records, certificates, firewall rules and anything that connects by IP address.
  2. Lower the TTL. Set DNS TTL to a few minutes at least a day before the move, so the switch spreads quickly.
  3. Build the new server. Same versions where possible. Install the stack and the certificate before you copy anything.
  4. First sync. Copy files with rsync and load a database dump. The site on the old server keeps serving.
  5. Test on the new host. Point your own computer at the new IP through the hosts file and click through login, checkout and forms.
  6. Freeze and final sync. Pause writes for a short window, such as orders or posts, repeat the file and database copy, and run rsync again for the last changes.
  7. Switch DNS. Change the A and AAAA records. Visitors move over within the TTL.
  8. Watch and keep the old server. Leave it online for one to two days. Check logs on both servers.
  9. Clean up. Raise the TTL again, stop cron on the old server and cancel it when you are sure.

What usually goes wrong

ProblemPrevention
Orders written to the old database after the final syncFreeze writes during the final copy, or run replication
Cron jobs running on both serversDisable them on the old host at cutover
Certificate errors on the new IPInstall the certificate before the DNS switch
Mail breaksLeave MX records alone unless mail moves too
Hard-coded IP in a firewall or API allowlistUpdate it from the inventory first

Rollback

The old server is your rollback. If something fails after the switch, point DNS back and fix the problem in daylight. This only works if you did not delete anything and if writes on the new server can be replayed or are not lost.

Choose the target with CPU, RAM and NVMe in mind. The decision to leave shared hosting is covered in cloud vs shared hosting. Order your server on the cloud server page.

Frequently asked questions

Is zero downtime really possible?

For read-heavy sites, yes. For shops and apps with writes you need a short freeze or replication, so aim for no visible interruption.

How low should the TTL be?

A few minutes, set at least a day before the cutover so caches expire.

Do I move email too?

Only if mail runs on the old server. Otherwise keep MX unchanged.

How long do I keep the old server?

One to two days after the switch, longer if the site has slow-moving traffic.

cloud migration zero downtime blue-green dns cutover kvm eurovdc

EuroVDC

Secure Your Website with SSL

Auto-renewal · Wildcard support · Instant activation

Get Your SSL Certificate

Was this article helpful?

– people found this helpful

Share on Social Media

Cloud Migration With Zero Downtime