A small program for creating postgresql backups at certain intervals.
Find a file
2024-11-23 19:17:06 +05:00
Dockerfile Initial commit 2024-11-23 18:36:41 +05:00
go.mod Initial commit 2024-11-23 18:36:41 +05:00
LICENSE.md Add GPL 3 2024-11-23 19:17:06 +05:00
main.go Initial commit 2024-11-23 18:36:41 +05:00
README.md Add more information to README 2024-11-23 19:10:31 +05:00

Postgresql backuper

A small program for creating postgresql backups at certain intervals.

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

services:
  backuper:
    image: git.comfycamp.space/lumin/postgresql-backuper
    environment:
      CUSTOM_ARGS: "-U postgres -h postgresql --no-password"
    volumes:
      - postgresql-backups:/backups