--- /dev/null
+#!/bin/sh
+set -e
+set -x
+# Heavily inspired by <https://docs.pleroma.social/backup.html>
+
+if [ "$#" -ne 1 ]; then
+ echo 'Need server IP as argument.'
+ false
+fi
+server_ip="$1"
+
+config_tree_prefix="${HOME}/config/buster"
+setup_scripts_dir="${config_tree_prefix}/setup_scripts"
+cd "${setup_scripts_dir}"
+./prepare_to_meet_server.sh "${server_ip}"
+read -p'Hit Enter when you are done.' ignore
+ssh plom@"${server_ip}" 'su -lc "cd config && git pull"'
+ssh plom@"${server_ip}" 'su -lc "cd config/buster/setup_scripts && ./backup_pleroma.sh"'
+scp plom@"${server_ip}":~/pleroma_backup.tar /home/plom/pleroma_backup.tar
+./backup_pleroma.sh
--- /dev/null
+#!/bin/sh
+# Do some of the steps necessary to SSH (key-based) with another server.
+set -e
+
+if [ "$#" -ne 1 ]; then
+ echo 'Need server IP as argument.'
+ false
+fi
+target="$1"
+
+# We need a public key to copy over, so generate it if not found.
+if [ ! -f ~/.ssh/id_rsa.pub ]; then
+ ssh-keygen
+fi
+
+# Add target to ~/.ssh/known_hosts so we don't get
+# asked for permission at inopportune moments.
+ssh-keyscan -H "$target" >> ~/.ssh/known_hosts
+
+# Tell user what to do.
+echo "APPEND FOLLOWING TO TARGET'S ~/.ssh/authorized_keys:"
+cat ~/.ssh/id_rsa.pub