The crunchy-backup container executes a full backup against another database container using the standard pg_basebackup utility that is included with PostgreSQL.


The following features are supported by the crunchy-backup container:

  • Backup and restoration from: pg_basebackup


The crunchy-backup Docker image contains the following packages (versions vary depending on PostgreSQL version):

  • PostgreSQL (12.5, 11.10, 10.15, 9.6.20 and 9.5.24)
  • CentOS7 - publicly available
  • UBI7 - customers only

Environment Variables


Name Default Description
BACKUP_LABEL crunchy-backup The label for the backup.
BACKUP_HOST None Name of the database the backup is being performed on.
BACKUP_USER None Username for the PostgreSQL role being used.
BACKUP_PASS None Password for the PostgreSQL role being used.
BACKUP_PORT 5432 Database port used to do the backup.


Name Default Description
CRUNCHY_DEBUG FALSE Set this to true to enable debugging in logs. Note: this mode can reveal secrets in logs.
BACKUP_OPTS None Optional parameters to pass to pg_basebackup.


Name Description
/backup Volume used by the pg_basebackup backup tool to store physical backups.
/pgdata Volume used to store the data directory contents for the PostgreSQL database.

Backup Location

Backups are stored in a mounted backup volume location, using the database host name plus -backups as a sub-directory, then followed by a unique backup directory based upon a date/timestamp. It is left to the user to perform database backup archives in this current version of the container. This backup location is referenced when performing a database restore.