Skip to content

Commit

Permalink
add indirect var for password
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Jul 24, 2024
1 parent 767fa1e commit 0448a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ echo "Starting PostgreSQL backup to S3..."
echo "Setup minio client..."
mc alias set s3 ${S3_ENDPOINT} ${S3_ACCESSKEY} ${S3_SECRETKEY}
echo "Backup database..."
PGPASSWORD=${PSQL_PASS} pg_dump -h ${PSQL_HOST} -U ${PSQL_USER} -C ${PSQL_NAME} > /backups/backup.sql
PGPASSWORD=${!PSQL_PASS} pg_dump -h ${PSQL_HOST} -U ${PSQL_USER} -C ${PSQL_NAME} > /backups/backup.sql
echo "Compress backup..."
gzip /backups/backup.sql
echo "Copy to S3..."
Expand Down

0 comments on commit 0448a7d

Please sign in to comment.