echo 'Need at least four arguments: old server IP, service name, DB name, and backup directory names.'
false
fi
-if [ ! "$1" = "pleroma" ] && [ ! "$1" = "peertube" ]; then
+if [ ! "$2" = "pleroma" ] && [ ! "$2" = "peertube" ]; then
echo "Need legal service name (pleroma or peertube)."
false
fi
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_${app}.sh ${app} ${db_name} $@"'
+ssh plom@"${server_ip}" "su -lc \"cd config/buster/setup_scripts && git pull && ./backup_app.sh ${app} ${db_name} $@\""
scp plom@"${server_ip}":~/${app}_backup.tar /home/plom/${app}_backup.tar
./restore_${app}.sh