Migrating to a new dedicated server
Most migrations are an upgrade to newer hardware. Done in the right order, users notice a pause of a few minutes at most.
When is it time to move?
When the current machine limits you and a newer one costs about the same, or when the workload has outgrown it. Common triggers are memory that no longer holds the database working set, a processor generation two or three steps behind, and disks that are filling. Comparing like for like often surprises: BUSINESS-2 2026 with the AMD EPYC 4345P runs far more per core than a four-year-old Xeon-E, and on 12 or 24 month terms there is no setup fee.
How much overlap do I need between the two rentals?
Plan on one to two weeks with both machines live. That covers delivery, building and testing the new system, a rehearsal and the final switch, with time to spare. A one month term on the new server keeps the overlap cheap if you prefer to commit later; the setup fee applies to 1 and 3 month first orders and the monthly price is the same for every term. Let the old server run until its paid period ends, then delete it from the console once you are sure nothing still points at it.
What needs doing before the first byte moves?
- An inventory of what runs on the old machine: services, cron jobs, timers, users, firewall rules and certificates.
systemctl list-units --type=service --state=runningandcrontab -lfor each user are good starting points. - A list of every place the old IP address is written down: DNS records, partner allow-lists, payment gateways, monitoring and mail SPF records.
- Lowered DNS TTLs, at least a day before the switch, so clients pick up the new address quickly. 300 seconds is a sensible value for the move.
- A tested backup of the old server, kept until the new one has run cleanly for a while.
dig +nocmd +noall +answer www.example.com # www.example.com. 300 IN A 192.0.2.40
How do I build the new system?
From packages and configuration, not by cloning the old disk. A fresh install on the new machine with your configuration copied across gives you a current kernel, clean package state and drivers for the new hardware. If you keep configuration in a tool such as Ansible, run it against the new host; otherwise copy /etc files service by service and compare them with diff rather than overwriting the whole directory.
How do I move the files?
In two passes with rsync: a bulk copy while the old server is live, then a short final pass during the switch. The Copy data between servers with rsync guide covers flags, parallel copies and checks. The bulk pass can take hours for terabytes; the final pass usually takes minutes because only changed files move.
What is the best way to move a database?
Replication for anything large, a dump for small databases. Replication keeps the new server seconds behind the old one, so the switch only needs the application to point at the new copy.
| Database size | Method | Downtime at switch |
|---|---|---|
| Under about 20 GB | Dump and restore during the window | Minutes, depends on import speed |
| Larger MariaDB or MySQL | Physical backup with mariabackup, then replication | Seconds to promote the replica |
| Larger PostgreSQL | pg_basebackup streaming replica, then promote | Seconds to promote the replica |
# PostgreSQL: start a streaming replica on the new server pg_basebackup -h 192.0.2.40 -U replicator -D /var/lib/postgresql/17/main -R -X stream -P # later, at the switch pg_ctl promote -D /var/lib/postgresql/17/main # or: pg_ctlcluster 17 main promote
Replication traffic crosses the public network, so allow the replication port only from the new server's address and use TLS or a WireGuard tunnel between the two machines.
How do I test before switching?
Point your own computer at the new server with a hosts file entry and use the site or application as a customer would. Check logins, uploads, payments in test mode, outgoing mail and scheduled jobs. Load tests at this stage are cheap insurance: a few minutes of wrk or k6 show whether the new tuning is in the right range.
# on your laptop, /etc/hosts 203.0.113.60 shop.example.com api.example.com
What does the switch itself look like?
A short, rehearsed sequence. Put the application into maintenance mode on the old server, run the final rsync pass, promote the database replica, start the application on the new server, then change the DNS records. With a 300 second TTL most clients move within five to ten minutes. For stragglers, a reverse proxy on the old server that forwards to the new address catches requests that still arrive there.
systemctl stop php8.4-fpm rsync -aHAX --numeric-ids --delete /srv/app/ root@203.0.113.60:/srv/app/ ssh root@203.0.113.60 "pg_ctlcluster 17 main promote && systemctl start php8.4-fpm"
What should I do after the move?
Watch logs and graphs on the new server for a few days, confirm backups run there, update SPF and partner allow-lists with the new address, and raise the DNS TTL again. Set reverse DNS for the new IPv4 address in the console. Only then delete the old server, after a last check that nothing in its logs shows traffic arriving.
Related pages
Copy data between servers with rsync
Move or mirror data from one machine to another over SSH with rsync, keep permissions intact, resume big copies and do a final short sync.
Read moreDatabase servers
NVMe machines with large memory for PostgreSQL, MySQL, MariaDB and MongoDB, from a single primary to replicated pairs.
Read moreFirst steps with a new server
The first hour after delivery: log in, check the hardware matches the order, update, add a user, lock down SSH and set a firewall.
Read moreBusiness servers
AMD EPYC or Intel Xeon processors, DDR5 memory and a guaranteed 3 Gbps port.
Read moreQuestions and answers
Does the old IPv4 address come along?
No. Each server has its own IPv4 address and IPv6 block. Lower DNS TTLs in advance and update allow-lists and SPF records after the move.
How long should both servers run in parallel?
One to two weeks is comfortable for building, testing and switching. A one month term on the new server covers it.
Should I clone the old disk to the new server?
It is better to install fresh and copy configuration and data. You get current packages and drivers for the new hardware.
How do I move a large database with little downtime?
Set up replication from the old to the new server, then promote the replica at the switch. Downtime drops to seconds.
Is there a setup fee on the new server?
First orders on 1 or 3 month terms carry one; 12 and 24 month terms skip it, at an identical monthly rate.