mirror of
https://github.com/prodrigestivill/docker-postgres-backup-local.git
synced 2026-05-31 08:37:58 +00:00
@@ -82,6 +82,7 @@ Most variables are the same as in the [official postgres image](https://hub.dock
|
|||||||
| BACKUP_KEEP_MONTHS | Number of monthly backups to keep before removal. Defaults to `6`. |
|
| BACKUP_KEEP_MONTHS | Number of monthly backups to keep before removal. Defaults to `6`. |
|
||||||
| BACKUP_KEEP_MINS | Number of minutes for `last` folder backups to keep before removal. Defaults to `1440`. |
|
| BACKUP_KEEP_MINS | Number of minutes for `last` folder backups to keep before removal. Defaults to `1440`. |
|
||||||
| BACKUP_LATEST_TYPE | Type of `latest` pointer (`symlink`,`hardlink`,`none`). Defaults to `symlink`. |
|
| BACKUP_LATEST_TYPE | Type of `latest` pointer (`symlink`,`hardlink`,`none`). Defaults to `symlink`. |
|
||||||
|
| VALIDATE_ON_START | If set to `FALSE` does not validate the configuration on start. Disabling this is not recommended. Defaults to `TRUE`. |
|
||||||
| HEALTHCHECK_PORT | Port listening for cron-schedule health check. Defaults to `8080`. |
|
| HEALTHCHECK_PORT | Port listening for cron-schedule health check. Defaults to `8080`. |
|
||||||
| POSTGRES_DB | Comma or space separated list of postgres databases to backup. If POSTGRES_CLUSTER is set this refers to the database to connect to for dumping global objects and discovering what other databases should be dumped (typically is either `postgres` or `template1`). Required. |
|
| POSTGRES_DB | Comma or space separated list of postgres databases to backup. If POSTGRES_CLUSTER is set this refers to the database to connect to for dumping global objects and discovering what other databases should be dumped (typically is either `postgres` or `template1`). Required. |
|
||||||
| POSTGRES_DB_FILE | Alternative to POSTGRES_DB, but with one database per line, for usage with docker secrets. |
|
| POSTGRES_DB_FILE | Alternative to POSTGRES_DB, but with one database per line, for usage with docker secrets. |
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ ENV POSTGRES_DB="**None**" \
|
|||||||
POSTGRES_EXTRA_OPTS="-Z1" \
|
POSTGRES_EXTRA_OPTS="-Z1" \
|
||||||
POSTGRES_CLUSTER="FALSE" \
|
POSTGRES_CLUSTER="FALSE" \
|
||||||
SCHEDULE="@daily" \
|
SCHEDULE="@daily" \
|
||||||
|
VALIDATE_ON_START="TRUE" \
|
||||||
BACKUP_ON_START="FALSE" \
|
BACKUP_ON_START="FALSE" \
|
||||||
BACKUP_DIR="/backups" \
|
BACKUP_DIR="/backups" \
|
||||||
BACKUP_SUFFIX=".sql.gz" \
|
BACKUP_SUFFIX=".sql.gz" \
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ ENV POSTGRES_DB="**None**" \
|
|||||||
POSTGRES_EXTRA_OPTS="-Z1" \
|
POSTGRES_EXTRA_OPTS="-Z1" \
|
||||||
POSTGRES_CLUSTER="FALSE" \
|
POSTGRES_CLUSTER="FALSE" \
|
||||||
SCHEDULE="@daily" \
|
SCHEDULE="@daily" \
|
||||||
|
VALIDATE_ON_START="TRUE" \
|
||||||
BACKUP_ON_START="FALSE" \
|
BACKUP_ON_START="FALSE" \
|
||||||
BACKUP_DIR="/backups" \
|
BACKUP_DIR="/backups" \
|
||||||
BACKUP_SUFFIX=".sql.gz" \
|
BACKUP_SUFFIX=".sql.gz" \
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
set -Eeo pipefail
|
set -Eeo pipefail
|
||||||
|
|
||||||
# Prevalidate configuration (don't source)
|
# Prevalidate configuration (don't source)
|
||||||
|
if [ "${VALIDATE_ON_START}" = "TRUE" ]; then
|
||||||
/env.sh
|
/env.sh
|
||||||
|
fi
|
||||||
|
|
||||||
EXTRA_ARGS=""
|
EXTRA_ARGS=""
|
||||||
# Initial background backup
|
# Initial background backup
|
||||||
|
|||||||
Reference in New Issue
Block a user