hs.scripts/rollback/synapse/rollback.sh
2024-04-25 13:49:12 +02:00

17 lines
359 B
Bash

#!/bin/bash
set -e
source $HOME/scripts/config.env
monit stop synapse
echo "syncing data..."
rsync -aAX --delete $HOME/var/rollback/media_store_clean/ $HOME/synapse/media_store/
echo "feeding the dump..."
pg_restore -c -h localhost -U $dbuser -d $db < $dump
monit start synapse
sleep 2
curl https://$(ls $HOME/doms)/_synapse/admin/v1/server_version|jq .