entrypoint.sh aktualisiert
This commit is contained in:
parent
a573b22911
commit
57871c9045
@ -13,7 +13,7 @@ echo "$PGHOST:5432:$PGDATABASE:$PGUSER:$PGPASSWORD" > ~/.pgpass
|
||||
chmod 600 ~/.pgpass
|
||||
|
||||
# Optional: Standardwert für den Dateinamen der Sicherung
|
||||
BACKUP_FILE=${BACKUP_FILE:-"/backup/$(echo $PGDATABASE)_$(date +%Y%m%d_%H%M%S).sql"}
|
||||
BACKUP_FILE=${BACKUP_FILE:-"/backup/$(echo $PGDATABASE)DB_$(date +%d-%m-%Y).sql"}
|
||||
|
||||
# Führe den pg_dump-Befehl aus (pg_dump wird automatisch die .pgpass-Datei verwenden)
|
||||
pg_dump -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -F c -f "$BACKUP_FILE"
|
||||
|
Loading…
Reference in New Issue
Block a user