PGPASSWORD
This commit is contained in:
parent
af6944e96d
commit
122549f077
@ -26,7 +26,7 @@ if [ -d "volumes/postgres" ]; then
|
|||||||
DB_PASSWORD=$(nerdctl exec $CONTAINER_NAME bash -c 'echo "$POSTGRES_PASSWORD"')
|
DB_PASSWORD=$(nerdctl exec $CONTAINER_NAME bash -c 'echo "$POSTGRES_PASSWORD"')
|
||||||
DB_NAME=$(nerdctl exec $CONTAINER_NAME bash -c 'echo "$POSTGRES_DATABASE"')
|
DB_NAME=$(nerdctl exec $CONTAINER_NAME bash -c 'echo "$POSTGRES_DATABASE"')
|
||||||
DUMP_NAME=$CONTAINER_NAME.sql
|
DUMP_NAME=$CONTAINER_NAME.sql
|
||||||
nerdctl exec -e $CONTAINER_NAME pg_dump -U $DB_USER $DB_NAME > volumes/$DUMP_NAME
|
nerdctl exec -e PGPASSWORD=$DB_PASSWORD $CONTAINER_NAME pg_dump -U $DB_USER $DB_NAME > volumes/$DUMP_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compress all volumes excerpt mysql and postgres
|
# Compress all volumes excerpt mysql and postgres
|
||||||
|
Loading…
x
Reference in New Issue
Block a user