1
0
Fork 0

Fix upgrade script

This commit is contained in:
Chocobozzz 2021-05-28 15:54:18 +02:00
parent 1025ce5df9
commit 86dc0b9cc9
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -41,7 +41,7 @@ then
DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])")
DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')")
mkdir -p $PEERTUBE_PATH/backup
PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-'peertube${DB_SUFFIX}'}" -f "$SQL_BACKUP_PATH"
PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-peertube${DB_SUFFIX}}" -f "$SQL_BACKUP_PATH"
else
echo "pg_dump not found. Cannot make a SQL backup!"
fi