Fix perms error when restoring db backup

This commit is contained in:
Salt 2020-07-30 08:45:59 -05:00
parent cdb7e6df7a
commit 99f746957f

View File

@ -55,7 +55,7 @@ fi
# Drop and recreate our database
sudo -Hu postgres psql -c 'DROP DATABASE pleroma;'
sudo -Hu postgres psql -c 'CREATE DATABASE pleroma;'
sudo -Hu postgres pg_restore -d pleroma -v -1 db.pgdump
cat db.pgdump | sudo -Hu postgres pg_restore -d pleroma -v -1 db.pgdump
sudo -Hu postgres vacuumdb --all --analyze-in-stages
# FIRE IT UP
systemctl start pleroma