website/docs: postgres troubleshooting: get PGPASSWORD from POSTGRES_PASSWORD_FILE (#15039)
This commit is contained in:
@ -49,7 +49,7 @@ After you are connected, execute these commands to create a database backup:
|
||||
cd /bitnami/postgresql/
|
||||
|
||||
# Set the PostgreSQL password from environment variable
|
||||
export PGPASSWORD=$POSTGRES_POSTGRES_PASSWORD
|
||||
export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
|
||||
|
||||
# Create a full database dump
|
||||
pg_dump -U $POSTGRES_USER $POSTGRES_DB > /bitnami/postgresql/dump.sql
|
||||
@ -117,7 +117,7 @@ cd /bitnami/postgresql/
|
||||
ls -lh dump.sql
|
||||
|
||||
# Set the PostgreSQL password
|
||||
export PGPASSWORD=$POSTGRES_POSTGRES_PASSWORD
|
||||
export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
|
||||
|
||||
# Import the database dump
|
||||
psql -U $POSTGRES_USER $POSTGRES_DB < dump.sql
|
||||
|
Reference in New Issue
Block a user