Docker container for quick setup postgres backup
Example backup.sh
:
#! /bin/bash
set -o errexit
set -o nounset
docker run \
-e PGHOST=<pg_host> \
-e PGUSER=<pg_user> \
-e PGPASSWORD=<pg_password> \
-e BACKUP_DATABASES=databases1,database2 \
-v <host_backups_folder>:/pg_backup \
junte/pg-backup:1.3-client12
If "BACKUP_DATABASES=_all_" - alldump will be executed