Copy application data and configuration, not the whole root filesystem. See why a clean target beats a disk clone.
Deploy the Target Server
Deploy a Linux server with at least the disk and memory the source server uses. See Deploy a Server, then connect over SSH. Match the source distribution and major version where you can. Moving Ubuntu 22.04 to Ubuntu 24.04 works, but expect config changes in nginx, PHP, and systemd unit paths.Set Up Access Between Servers
Generate a dedicated key on the Arct Cloud server and pull data from the source. Pulling means the source never needs credentials for the new machine.~/.ssh/authorized_keys for the root user on the source server, then confirm the connection:
Capture the System State
Application files are the obvious half. The other half is the account, key, and rule state your app depends on. Bundle it on the source server in one pass so nothing is missed:/etc/passwd or /etc/shadow with the old ones; use them as the reference when you recreate accounts:
Install the Same Packages
On the source server, list the packages you installed by hand:dnf repoquery --userinstalled --qf '%{name}' and dnf install.
Copy Application Data
Usersync for each directory that matters. Run it as often as you like; only changed files transfer.
Repeat for the rest:
/etc/nginx/, /opt/, /home/, /srv/, and any application-specific paths.
The trailing slash on the source path matters.
/var/www/ copies the contents; /var/www copies the directory itself into the target.Move Databases
MySQL or MariaDB
MySQL or MariaDB
On the source server:On the Arct Cloud server:Application users and grants come across with
--all-databases. Verify with SHOW GRANTS FOR 'appuser'@'localhost';.PostgreSQL
PostgreSQL
On the source server:On the Arct Cloud server:
pg_dumpall includes roles and passwords. Match the major PostgreSQL version on both sides.MongoDB
MongoDB
Redis
Redis
Trigger a save on the source, copy
/var/lib/redis/dump.rdb while Redis is stopped on the target, then start it:Recreate Services and Schedules
Copy your unit files, then reload:/tmp/old-state/etc/passwd:
/tmp/old-state/etc/cron.d for system-level jobs:
Reapply the Firewall
Read the rules you exported to/tmp/ufw-rules.txt, then recreate them:
firewalld, use firewall-cmd --list-all and firewall-cmd --permanent --add-service=.
Verify Before DNS
Point your own machine at the new server without touching public DNS. Add a line to your local hosts file,/etc/hosts on Linux and macOS or C:\Windows\System32\drivers\etc\hosts on Windows:
Cut Over
1
Stop Writes on the Source
Put the application in maintenance mode or stop its service so no new data lands on the old server.
2
Run a Final Sync
Repeat the
rsync commands and re-dump the database. This pass is fast because only recent changes transfer.3
Update DNS
Change the A and AAAA records to the new IP. See Website and DNS Migration for record-level detail.
4
Watch the New Server
Follow the logs and the CPU, memory, and network graphs on the server detail page for the first hour.
5
Decommission the Source
Keep the old server for a few days, then run the checks before you delete it.
Troubleshooting
Permission denied (publickey) when pulling from the source
Permission denied (publickey) when pulling from the source
Confirm the public key is in the source’s
/root/.ssh/authorized_keys, that the file is chmod 600, and that PermitRootLogin allows key auth in the source’s /etc/ssh/sshd_config.Files arrive owned by the wrong user
Files arrive owned by the wrong user
You omitted
--numeric-ids, so rsync remapped ownership by name. Recreate the users with matching UIDs, then re-run the sync with the flag.The application starts but cannot reach its database
The application starts but cannot reach its database
Check the connection host in your app config.
localhost on the old server may have meant a socket path that differs on the new distribution version. Confirm the database is listening with ss -lntp.rsync fails with 'No space left on device'
rsync fails with 'No space left on device'
Run
df -h on the target. If the plan disk is smaller than the source’s used space, resize before continuing.SELinux blocks the web server after copying files
SELinux blocks the web server after copying files
On RHEL-family systems, restore the file contexts:
sudo restorecon -Rv /var/www.