#!/bin/bash set -e source $HOME/scripts/config.env echo "syncing data..." rsync -aAX --delete $HOME/var/rollback/media_clean/user/ $HOME/data/media/user/ echo "feeding the dump..." pg_restore -c -h localhost -U $dbuser -d $db < $dump . $HOME/scripts/restart.sh