skandragon / postgresql-simple-backup

A simple backup system for a postgresql database, inside a Docker container.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postgresql-simple-backup

Docker Hub: https://hub.docker.com/repository/docker/skandragon/postgresql-simple-backup Git: https://github.com/skandragon/postgresql-simple-backup

Simple backup strategy for PostgreSQL, useful for simple installations or non-critical systems.

postgresql-simple-backup is a Docker container which can run once, or loop internally, doing backups of selected database on a target host.

Configuration

Any defaults are shown, but check run.sh just to make sure they are in sync.

All configuration parameters are provided via environment variables.

Connection

These connection parameters must be defined. All databases backed up will share this common configuration.

PGHOST=
PGPORT=5432
PGUSER=
PGPASSWORD=

Databases

A space-separated list of databases to back up.

DATABASES=

Cleanup

Age, in days, when older backups will be removed. If empty, no expiring will happen.

BACKUP_EXPIRE_DAYS=14

If defined as an empty string, it will disable expiration.

Destination

Location where backups will be written. This should be a volume mount.

BACKUP_DESTINATION=/backups

Schedule

Back up pause. This specifies the delay between current backup ending to the time the next one is started.

BACKUP_FREQUENCY=3600

If defined as an empty string, the container will exit once a single backup run is performed.

About

A simple backup system for a postgresql database, inside a Docker container.

License:Apache License 2.0


Languages

Language:Shell 46.5%Language:Dockerfile 45.7%Language:Makefile 7.8%