service pleroma stop
su postgres -lc 'pg_dump -d pleroma --format=custom -f /tmp/pleroma.pgdump'
cd /tmp
-mkdir pleroma_backup
+mkdir -p pleroma_backup
mv pleroma.pgdump pleroma_backup
cp -a /var/lib/pleroma/uploads pleroma_backup/uploads
cp -a /etc/pleroma pleroma_backup/etc_files
config_tree_prefix="${HOME}/config/buster"
setup_scripts_dir="${config_tree_prefix}/setup_scripts"
-# So we're only asked once …
-eval $(ssh-agent)
-ssh-add
-
cd "${setup_scripts_dir}"
./prepare_to_meet_server.sh "${server_ip}"
+eval $(ssh-agent) && ssh-add
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"'
+ssh plom@"${server_ip}" 'su -lc "cd config && git pull && cd config/buster/setup_scripts && ./backup_pleroma.sh"'
scp plom@"${server_ip}":~/pleroma_backup.tar /home/plom/pleroma_backup.tar
./restore_pleroma.sh