home · contact · privacy
Update raspi setup.
[config] / buster / setup_scripts / migrate_borg.sh
1 #!/bin/sh
2 set -e
3
4 if [ "$#" -ne 1 ]; then
5     echo 'Need  old server IP.'
6     false
7 fi
8 old_server="$1"
9 config_tree_prefix="${HOME}/config/buster"
10 cp "${config_tree_prefix}/setup_scripts/prepare_to_meet_server.sh" /home/plom/
11 chown plom:plom /home/plom/prepare_to_meet_server.sh
12 su -lc "./prepare_to_meet_server.sh ${old_server}" plom
13 read -p'Hit Enter when you are done.' ignore
14 rm /home/plom/prepare_to_meet_server.sh
15 cp "${config_tree_prefix}/setup_scripts/mirror_dir.sh" /home/plom/
16 su -lc "./mirror_dir.sh ${old_server} /home/plom/borg" plom
17 rm /home/plom/mirror_dir.sh