From da4af5c271e5775d9eca271c5669536657d24285 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 9 Oct 2023 01:39:31 +0200 Subject: [PATCH] Add Bookworm borg migration script. --- bookworm/setup_scripts/migrate_borg.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bookworm/setup_scripts/migrate_borg.sh diff --git a/bookworm/setup_scripts/migrate_borg.sh b/bookworm/setup_scripts/migrate_borg.sh new file mode 100755 index 0000000..9dad0bc --- /dev/null +++ b/bookworm/setup_scripts/migrate_borg.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +. ./misc.sh + +expect_n_args 1 "(old server IP)" "$@" +old_server="$1" +cp "${setup_scripts_dir}/prepare_to_meet_server.sh" /home/plom/ +chown plom:plom /home/plom/prepare_to_meet_server.sh +su -lc "./prepare_to_meet_server.sh ${old_server}" plom +read -p'Hit Enter when you are done.' ignore +rm /home/plom/prepare_to_meet_server.sh +cp "${setup_scripts_dir}/mirror_dir.sh" /home/plom/ +su -lc "./mirror_dir.sh ${old_server} /home/plom/borg" plom +rm /home/plom/mirror_dir.sh -- 2.30.2