From b2cacd60107d76aa5db8288f2d4f6e6dfd5bfe55 Mon Sep 17 00:00:00 2001 From: steffeydev Date: Thu, 17 Jul 2025 20:56:18 +0000 Subject: [PATCH] Update Moving to a new server --- Moving-to-a-new-server.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Moving-to-a-new-server.md b/Moving-to-a-new-server.md index 87ea0b6..be84842 100644 --- a/Moving-to-a-new-server.md +++ b/Moving-to-a-new-server.md @@ -1,9 +1,15 @@ +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` -3. On the new server, generate SSH keys, and add it to the authorized keys of the old server -4. Copy the volumes over: + +On the new server: + +3. Generate SSH keys, and add it to the authorized keys of the old server +4. Copy the archives over: * `scp @:/tmp/db.tar /tmp` * `scp @:/tmp/sites.tar /tmp` -5. \ No newline at end of file +5. 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`