aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-11 13:43:41 +0200
committerChocobozzz <me@florianbigard.com>2023-07-11 13:43:41 +0200
commit97f57e928fafb715d0763e97c7a3e6fd454a0bfc (patch)
treeddb091fd660ade5097f92feebbda271f2c65bec1 /scripts
parent34555bebf8e2a2caf2cb1cfd85280d140fcc3802 (diff)
downloadPeerTube-97f57e928fafb715d0763e97c7a3e6fd454a0bfc.tar.gz
PeerTube-97f57e928fafb715d0763e97c7a3e6fd454a0bfc.tar.zst
PeerTube-97f57e928fafb715d0763e97c7a3e6fd454a0bfc.zip
Add custom db port when upgrading peertube
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/upgrade.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh
index 86135fcc9..64c7e1581 100755
--- a/scripts/upgrade.sh
+++ b/scripts/upgrade.sh
@@ -43,10 +43,11 @@ if [ -x "$(command -v pg_dump)" ]; then
43 DB_USER=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['username'])") 43 DB_USER=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['username'])")
44 DB_PASS=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['password'])") 44 DB_PASS=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['password'])")
45 DB_HOST=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['hostname'])") 45 DB_HOST=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['hostname'])")
46 DB_PORT=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['port'])")
46 DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])") 47 DB_SUFFIX=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['suffix'])")
47 DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')") 48 DB_NAME=$(node -e "console.log(require('js-yaml').load(fs.readFileSync('$PEERTUBE_PATH/config/production.yaml', 'utf8'))['database']['name'] || '')")
48 49
49 PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -h $DB_HOST -F c "${DB_NAME:-peertube${DB_SUFFIX}}" -f "$SQL_BACKUP_PATH" 50 PGPASSWORD=$DB_PASS pg_dump -U $DB_USER -p $DB_PORT -h $DB_HOST -F c "${DB_NAME:-peertube${DB_SUFFIX}}" -f "$SQL_BACKUP_PATH"
50else 51else
51 echo "pg_dump not found. Cannot make a SQL backup!" 52 echo "pg_dump not found. Cannot make a SQL backup!"
52fi 53fi