Skip to main content
This guide copies application data, databases, and service configuration from your current Linux server to an Arct Cloud server. Read the migration overview first.
Copy application data and configuration, not the whole root filesystem. See why a clean target beats a disk clone.
Stop or pause any service that writes while you copy its data. Anything written after the copy starts is left behind, and the gap is easy to miss until the new server is already live.

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.
Add that public key to ~/.ssh/authorized_keys for the root user on the source server, then confirm the connection:
Delete /root/.ssh/migration and remove the key from the source server once the migration is done.

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:
Firewall rules are readable rather than file-based, so export them alongside, still on the source server:
Copy both to the new server and unpack the bundle somewhere safe to read from. Do not overwrite the new server’s own /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:
Copy the list over and install it on the Arct Cloud server:
On RHEL, AlmaLinux, or Rocky, use dnf repoquery --userinstalled --qf '%{name}' and dnf install.

Copy Application Data

Use rsync 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

Never rsync a running database’s data directory. Dump it instead, or stop the database first.
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';.
On the source server:
On the Arct Cloud server:
pg_dumpall includes roles and passwords. Match the major PostgreSQL version on both sides.
Copy the directory across, then restore:
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:
Recreate local users with the same UID before copying files they own. Read the original UID out of the captured /tmp/old-state/etc/passwd:
Restore each user’s crontab from the captured state, then check /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:
On 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:
Load the site, sign in, submit a form, and check the logs:
Remove the hosts entry when you are done testing.

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

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.
You omitted --numeric-ids, so rsync remapped ownership by name. Recreate the users with matching UIDs, then re-run the sync with the flag.
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.
Run df -h on the target. If the plan disk is smaller than the source’s used space, resize before continuing.
On RHEL-family systems, restore the file contexts: sudo restorecon -Rv /var/www.