From: Christian Heller Date: Sun, 8 Oct 2023 23:39:31 +0000 (+0200) Subject: Add Bookworm borg migration script. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/ledger?a=commitdiff_plain;h=da4af5c271e5775d9eca271c5669536657d24285;p=config Add Bookworm borg migration script. --- 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