postgresql-backuper/README.md

30 lines
1.3 KiB
Markdown
Raw Normal View History

2024-11-23 18:36:41 +05:00
# Postgresql backuper
A small program for creating postgresql backups at certain intervals.
2024-11-23 19:10:31 +05:00
## Configuration
| Env variable | Description | Default in docker |
| --- | --- | --- |
| BACKUPS_DIR | | /backups |
| PGDUMP_BINARY | | pg_dumpall |
| CUSTOM_ARGS | Arguments passed to PGDUMP_BINARY. Don't use `-f`. | |
| BACKUP_INTERVAL | Time between backups. | 24h |
| RETENTION | Backups older than the RETENTION period will be deleted. | 168h |
The duration must be in a format understood by the golang's `time` package.
## Docker-compose example
```yml
services:
backuper:
image: git.comfycamp.space/lumin/postgresql-backuper
environment:
CUSTOM_ARGS: "-U postgres -h postgresql --no-password"
volumes:
- postgresql-backups:/backups
```