Use .env file for backup configuration #1
|
@ -63,10 +63,8 @@ for PREFIX in $DATABASE_PREFIXES; do
|
|||
|
||||
# Perform the backup based on the specified format
|
||||
if [[ "$DUMP_FORMAT" == "custom" ]]; then
|
||||
echo "Performing custom format backup with zstd compression level 21..."
|
||||
pg_dump -h "$HOST" -p "$PORT" -U "$USER" -Fc --compress="zstd:21" "$DB_NAME" -f "$BACKUP_FILE"
|
||||
elif [[ "$DUMP_FORMAT" == "sql" ]]; then
|
||||
echo "Performing SQL format backup with gzip compression..."
|
||||
pg_dump -h "$HOST" -p "$PORT" -U "$USER" "$DB_NAME" | gzip -9 > "$BACKUP_FILE"
|
||||
else
|
||||
echo "Invalid DUMP_FORMAT for $PREFIX: $DUMP_FORMAT. Skipping..."
|
||||
|
|
Loading…
Reference in a new issue