home · contact · privacy
Pleroma migration scripts.
[config] / buster / setup_scripts / migrate_pleroma.sh
1 #!/bin/sh
2 set -e
3 set -x
4 # Heavily inspired by <https://docs.pleroma.social/backup.html>
5
6 if [ "$#" -ne 1 ]; then
7     echo 'Need server IP as argument.'
8     false
9 fi
10 server_ip="$1"
11
12 config_tree_prefix="${HOME}/config/buster"
13 setup_scripts_dir="${config_tree_prefix}/setup_scripts"
14 cd "${setup_scripts_dir}"
15 ./prepare_to_meet_server.sh "${server_ip}"
16 read -p'Hit Enter when you are done.' ignore
17 ssh plom@"${server_ip}" 'su -lc "cd config && git pull"'
18 ssh plom@"${server_ip}" 'su -lc "cd config/buster/setup_scripts && ./backup_pleroma.sh"'
19 scp plom@"${server_ip}":~/pleroma_backup.tar /home/plom/pleroma_backup.tar
20 ./backup_pleroma.sh