mirror of
https://github.com/garraflavatra/docker-volume-s3-backup.git
synced 2025-07-19 08:04:04 +00:00
Added auto-remove for old backups.
This commit is contained in:
@ -24,11 +24,14 @@ pg_backup_s3:
|
||||
POSTGRES_DATABASE: dbname
|
||||
POSTGRES_USER: user
|
||||
POSTGRES_PASSWORD: password
|
||||
BACKUP_KEEP_DAYS: 7
|
||||
```
|
||||
|
||||
- Images are tagged by the major PostgreSQL version they support: `10`, `11`, `12`, `13`, or `14`.
|
||||
- The `SCHEDULE` variable determines backup frequency. See go-cron schedules documentation [here](http://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules). Omit to run the backup immediately and then exit.
|
||||
- If `PASSPHRASE` is provided, the backup will be encrypted using GPG.
|
||||
- Run `docker exec <container name> sh backup.sh` to trigger a backup ad-hoc
|
||||
- Use `BACKUP_KEEP_DAYS` to set time for how long you want to keep backup.
|
||||
|
||||
## Restore
|
||||
> **WARNING:** DATA LOSS! All database objects will be dropped and re-created.
|
||||
|
Reference in New Issue
Block a user