4
Moving to a new server
steffeydev edited this page 2025-07-17 21:09:32 +00:00

First, switch domains to point at new servers.

On the old server:

  1. Stop docker on old server: systemctl stop docker
  2. Backup volumes:
  • docker run --rm -v frappe_db-data:/data -v /tmp:/backup busybox tar cvf /backup/db.tar /data
  • docker run --rm -v frappe_sites:/data -v /tmp:/backup busybox tar cvf /backup/sites.tar /data

On the new server:

  1. Generate SSH keys, and add it to the authorized keys of the old server
  2. Copy the archives over:
  • scp <old-user>@<old-ip>:/tmp/db.tar /tmp
  • scp <old-user>@<old-ip>:/tmp/sites.tar /tmp
  1. Create the new volumes and restore the data:
  • docker volume create frappe_db-data && docker run --rm -v frappe_db-data:/data -v /tmp:/backup busybox tar xvf /backup/db.tar
  • docker volume create frappe_sites && docker run --rm -v frappe_sites:/data -v /tmp:/backup busybox tar xvf /backup/sites.tar
  1. Copy over /root/frappe-compose.yml
  2. docker compose -f /root/frappe-compose.yml up -d
  3. Clean up: rm /tmp/db.tar && rm /tmp/sites.tar

Service should now be back up and running. The proxy may need a minute to fetch the certs again, since we didn't copy those over.