chore: add backup prune, replace period flag by BACKUP_RETENTION_DAYS environment variable
This commit is contained in:
@@ -60,7 +60,7 @@ services:
|
||||
# for a list of available releases.
|
||||
image: jkaninda/pg-bkup
|
||||
container_name: pg-bkup
|
||||
command: backup --storage s3 -d my-database --mode scheduled --period "0 1 * * *"
|
||||
command: backup --storage s3 -d my-database"
|
||||
environment:
|
||||
- DB_PORT=5432
|
||||
- DB_HOST=postgres
|
||||
@@ -74,6 +74,8 @@ services:
|
||||
- AWS_ACCESS_KEY=xxxx
|
||||
- AWS_SECRET_KEY=xxxxx
|
||||
# - BACKUP_CRON_EXPRESSION=0 1 * * * # Optional
|
||||
#Delete old backup created more than specified days ago
|
||||
#- BACKUP_RETENTION_DAYS=7
|
||||
## In case you are using S3 alternative such as Minio and your Minio instance is not secured, you change it to true
|
||||
- AWS_DISABLE_SSL="false"
|
||||
# pg-bkup container must be connected to the same network with your database
|
||||
|
||||
@@ -78,6 +78,8 @@ services:
|
||||
- SSH_USER=user
|
||||
- REMOTE_PATH=/home/jkaninda/backups
|
||||
- SSH_IDENTIFY_FILE=/tmp/id_ed25519
|
||||
#Delete old backup created more than specified days ago
|
||||
#- BACKUP_RETENTION_DAYS=7
|
||||
## We advise you to use a private jey instead of password
|
||||
#- SSH_PASSWORD=password
|
||||
# pg-bkup container must be connected to the same network with your database
|
||||
|
||||
@@ -77,6 +77,8 @@ services:
|
||||
- DB_USERNAME=username
|
||||
- DB_PASSWORD=password
|
||||
- BACKUP_CRON_EXPRESSION=0 1 * * *
|
||||
#Delete old backup created more than specified days ago
|
||||
#- BACKUP_RETENTION_DAYS=7
|
||||
# pg-bkup container must be connected to the same network with your database
|
||||
networks:
|
||||
- web
|
||||
|
||||
Reference in New Issue
Block a user