Step 1
Inventory and quiesce the application
Record packages, services, ports, environment files, scheduled jobs, and database versions. Put the application in maintenance mode or stop writes.
systemctl --type=service --state=running
ss -lntup
df -hTStep 2
Export databases
Use the database's native logical backup and verify the output is non-empty before copying it.
mysqldump --single-transaction --all-databases | gzip > /root/mysql.sql.gzStep 3
Copy application data
Preserve ownership, modes, links, ACLs, and extended attributes. Exclude virtual filesystems and ephemeral caches.
rsync -aHAX --numeric-ids --info=progress2 /srv/ root@<destination-ip>:/srv/Step 4
Restore and verify
Restore the database, start services, test through a local hosts-file override, and compare checksums or application health before DNS cutover.
