+++ /dev/null
-#!/bin/sh
-set -e
-
-service peertube stop
-cd /tmp
-mkdir -p peertube_backup
-su peertube -c 'pg_dump -Fc peertube_prod' > peertube_backup/peertube_prod-dump.db
-cp -a /var/www/peertube/storage peertube_backup/storage
-cp -a /var/www/peertube/config peertube_backup/config
-tar cf peertube_backup.tar peertube_backup
-chown plom:plom peertube_backup.tar
-mv peertube_backup.tar /home/plom/
-service peertube start
+++ /dev/null
-#!/bin/sh
-set -e
-
-# Heavily inspired by <https://docs.pleroma.social/backup.html>
-
-service pleroma stop
-su postgres -lc 'pg_dump -d pleroma --format=custom -f /tmp/pleroma.pgdump'
-cd /tmp
-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
-tar cf pleroma_backup.tar pleroma_backup
-rm -rf pleroma_backup
-chown plom:plom pleroma_backup.tar
-mv pleroma_backup.tar /home/plom/
-service pleroma start
+++ /dev/null
-#!/bin/sh
-set -e
-
-# 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
-eval $(ssh-agent) && ssh-add
-echo 'Enter password for root on target server next.'
-ssh plom@"${server_ip}" 'su -lc "cd config/buster/setup_scripts && git pull && ./backup_peertube.sh"'
-scp plom@"${server_ip}":~/peertube_backup.tar /home/plom/peertube_backup.tar
-./restore_peertube.sh
-
+++ /dev/null
-#!/bin/sh
-set -e
-
-# 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
-eval $(ssh-agent) && ssh-add
-echo 'Enter password for root on target server next.'
-ssh plom@"${server_ip}" 'su -lc "cd config/buster/setup_scripts && git pull && ./backup_pleroma.sh"'
-scp plom@"${server_ip}":~/pleroma_backup.tar /home/plom/pleroma_backup.tar
-./restore_pleroma.sh
+++ /dev/null
-#!/bin/sh
-set -e
-
-service peertube stop
-mv /home/plom/peertube_backup.tar /tmp/
-cd /tmp
-tar xf peertube_backup.tar
-cp -a peertube_backup/storage/* /var/www/peertube/storage/
-cp -a peertube_backup/config/* /var/www/peertube/config/
-su postgres -c 'pg_restore -c -C -d postgres peertube_backup/peertube_prod-dump.db'
-
-db_pw=$(cat /var/www/peertube/config/production.yaml | grep password | head -1 | sed "s/[ ]*password\: *//g" | sed "s/'//g")
-su postgres -lc "psql -c \"ALTER USER peertube WITH PASSWORD '${db_pw}';\""
-
-service peertube start
+++ /dev/null
-#!/bin/sh
-set -e
-
-# Heavily inspired by <https://docs.pleroma.social/backup.html>
-
-service pleroma stop
-mv /home/plom/pleroma_backup.tar /tmp/
-cd /tmp
-tar xf pleroma_backup.tar
-cp -a pleroma_backup/uploads/* /var/lib/pleroma/uploads/
-cp -a pleroma_backup/etc_files/* /etc/pleroma/
-su postgres -lc 'pg_restore --clean -d pleroma -v -1 /tmp/pleroma_backup/pleroma.pgdump'
-
-# TODO: Horrible hack, improve.
-db_pw=$(cat /etc/pleroma/config.exs | grep password | sed 's/[ ]*password\: *//g' | sed 's/,//g' | sed 's/"//g')
-su postgres -lc "psql -c \"ALTER USER pleroma WITH PASSWORD '${db_pw}';\""
-
-service pleroma start