Has anyone ever successfully moved a working ERPNext system to another server without using a server image?

I have multiple sites on single vps, moving them one by one is time consuming.

For moving files and database in a single command I use rsync.

For database:

ssh keys need to be configured for this to work

Execute on source and target machine to stop mariadb

sudo systemctl stop mariadb

Execute on source machine to move database files

sudo rsync -avz /var/lib/mysql/* user@example.com:/var/lib/mysql/ 

Execute on target machine set ownership and restart mariadb

sudo chown mysql:mysql -R /var/lib/mysql/
ls  -l /var/lib/mysql/
sudo systemctl start mariadb
4 Likes