Moving to a new server: plan your migration
A practical plan for moving from one server or plan to another, covering inventory, backups, copying data, testing, switching DNS and cancelling the old service only when you are sure.
- Beginner
- All
- 5 min read
Moving to a new server is mostly planning. The copying itself is often the quickest part. What causes trouble is the forgotten cron job, the firewall rule nobody wrote down, or a DNS change made before the new server was ready. This guide gives you a plan that works whether you are moving to a bigger RunRacks plan, a different location, or from another provider.
Before you start
- Access to the old server (SSH or Remote Desktop) and to wherever your domain's DNS is managed.
- A new server, ordered from Pricing and showing in your Dashboard. Keep the old one running until the very end.
- A rough idea of how much data you need to move. On Linux,
du -sh /var/www /homegives a quick size for common folders.
Step 1: take inventory
Write down everything the old server does. A plain text list is enough. Go through:
- Apps and services: web server, database, PHP or Node.js versions, background workers, Windows services, trading terminals.
- Data: website files, databases, uploads, user home folders, app data folders on Windows.
- Scheduled tasks: cron jobs on Linux (
crontab -lfor each user, and files in/etc/cron.d), or Task Scheduler on Windows. - Network settings: open ports, firewall rules, allow-lists that include the server's IP.
- Certificates and secrets: SSL certificates, API keys,
.envfiles, licence keys. - DNS records: every record that points at the old IP address, including subdomains and mail.
Anything you install by hand on the new server, add to the list as you go. That list becomes your rebuild document for the next move.
Step 2: back up the old server
Take a full backup before you touch anything. Store it off the server: on your own computer or in separate storage. If something goes wrong during the move, this is your way back.
For databases, take a proper dump rather than copying live data files. A copy of the files of a running database can be inconsistent.
Step 3: lower the DNS TTL early
DNS records have a TTL (time to live) that tells resolvers how long to cache them. If your records use a long TTL, lower it to something like 300 seconds (five minutes) a day or two before the move. Then, on switch-over day, the change reaches users quickly.
You change the TTL where your domain's DNS is hosted. RunRacks does not sell domains, so that is usually your domain registrar or DNS provider.
Step 4: set up the new server
- Log in with the details from the new service page in the Dashboard.
- Change the password and install updates.
- Install the same software you listed in Step 1, at the same or a compatible version.
- Recreate users, firewall rules and scheduled tasks.
On Windows, remember that Remote Desktop on RunRacks servers uses port 12230. Connect with 198.51.100.20:12230, and keep that port open in Windows Firewall.
Step 5: copy your data
On Linux, rsync over SSH is the usual tool. Run it from the new server to pull files from the old one:
rsync -avz --progress [email protected]:/var/www/ /var/www/Here -a keeps permissions and timestamps, -v shows each file and -z compresses data on the way. The trailing slashes matter: they copy the contents of the folder.
Import database dumps on the new server, then check the row counts or a few records.
On Windows, copy files through the Remote Desktop clipboard for small amounts, or use a file transfer tool for larger ones.
Double-check the direction of any copy command. Swapping source and destination can overwrite your good data with an empty folder.
Step 6: test before you switch
Test the new server while users still go to the old one.
- Websites: edit the
hostsfile on your own computer so your domain points at the new IP for you only. On Windows it isC:\Windows\System32\drivers\etc\hosts; on macOS and Linux it is/etc/hosts. Add a line such as:
198.51.100.20 example.com www.example.comBrowse the site, log in, submit a form, and check images and SSL. Remove the line afterwards.
- Apps and bots: run them on the new server against test settings first.
- Scheduled tasks: confirm they run at least once.
Step 7: switch over
- Pick a quiet time.
- If data changes often (databases, uploads), stop writes on the old server and do a final
rsyncand database dump. - Update your DNS
Arecords (andAAAAif you use IPv6) to the new IP address. - Update allow-lists, broker whitelists and any app that connects by IP.
Watch the new server's logs as traffic arrives.
Step 8: cancel the old service last
Leave the old server running for a few days while you watch for problems. When you are confident nothing still points at it, take one last backup and submit a cancellation request for the old service. Read /terms and /refund first so you know how cancellations are handled.
Check it works
dig +short example.com(ornslookup example.comon Windows) returns the new IP.- The old server's access logs show no new visitors after a day or two.
- Every item on your inventory list is ticked off on the new server.
Troubleshooting
- Some visitors still reach the old server: their resolver cached the old record. Wait until the old TTL has passed.
- The site loads but shows errors: a PHP extension, file permission or config value is missing. Compare with your inventory list.
- Emails stopped working: an
MX,SPFor other mail record still points at the old IP. - A scheduled task did not run: it was not recreated, or its time zone differs on the new server.
Next steps
- Before you cancel, read Cancel a service with a cancellation request.
- Learn how DNS changes work: Point a domain to your VPS: DNS basics.
- Moving a lot of files on Linux? See Migrate files between servers with rsync.
- Ready to order? Compare plans on Pricing.
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Getting started
Edit files with nano: a beginner's guide
Open, edit, search and save files with the nano text editor on a Linux server, including cutting and pasting lines, showing line numbers and safely editing system config files with sudo.
- Beginner
- Linux VPS
- 5 min read
Getting started
Your first hour with a new RunRacks server
A step-by-step roadmap for the first hour after your RunRacks server is delivered, from finding your login details to changing the password, updating the OS and picking your next guides.
- Beginner
- All
- 5 min read
Getting started
How to choose a server location
Pick a data center location based on where your users, broker or team are, confirm it with ping tests, and weigh the legal and latency points that come with each choice.
- Beginner
- All
- 4 min read