PostgreSQL backup utility that allow copy pg_dump result to any rclone supported storages.
392
This script connects to a Postgres database, executes pg_dump with the specified options in directory format and uploads the generated files to a Rclone supported storage.
v1.1
The following environment variables are required:
PG_HOST: The host for the Postgres instance to run pg_dump.PG_PORT: The port for the Postgres instance to run pg_dump.PG_USER: Username to authenticate on the Postgres instance.PG_PASSWORD: Password to authenticate on the Postgres instance.PG_DUMP_DBS: A spsace separated list of databases to backup.PG_DUMP_ARGS: A space seperated string of custom args to pass to the "pg_dump" commands.REMOTE_PATH: A path on remote storageRCLONE_CONFIG_REMOTE_*: rclone config via environment variables for remote:. See https://rclone.org/docs/#environment-variables.RCLONE_CONFIG_*: rclone params. See https://rclone.org/docs/#environment-variables.BACKUP_PASSWORD: If defined, the remote backup will be ecnrypted with rclone crypt and defined passworddocker compose for Backblaze B2 and databases mydatabase1, mydatabase2:
services:
rclone-pg-backup:
image: devpnd/rclone-pg-backup
environment:
PG_HOST: host.docker.internal
PG_PORT: 5432
PG_USER: postgres
PG_PASSWORD: dev
PG_DUMP_DBS: 'mydatabase1 mydatabase2'
RCLONE_CONFIG_REMOTE_TYPE: b2
RCLONE_CONFIG_REMOTE_ACCOUNT: 0000000000000000000000000
RCLONE_CONFIG_REMOTE_KEY: DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
REMOTE_PATH: backet/mypath
# Disable check destination for write only mode
RCLONE_NO_CHECK_DEST: true
RCLONE_MULTI_THREAD_STREAMS: 1
# Encrypt remote backup
BACKUP_PASSWORD: ${BACKUP_PASSWORD}
Content type
Image
Digest
sha256:d7e37f9c2…
Size
26.1 MB
Last updated
about 2 years ago
docker pull devpnd/rclone-pg-backup:v1.1