It's same as docker-postgres-backup-local, But:
- Used
pg_dump
over ssh - Backup from remote PostgreSQL container
$ git clone https://github.com/omidraha/periodic-pgdump-over-ssh && cd periodic-pgdump-over-ssh
$ docker build -t omidraha/periodic-pgdump-over-ssh .
$ mv env.example.sh env.sh
$ source env.sh
$ docker-compose up -d
env variable | description |
---|---|
SSH_REMOTE_USER | Username of remote server. Defaults to ubuntu . |
SSH_REMOTE_HOST | Host of remote server. Defaults to example.com . |
POSTGRES_DB_CONTAINER_NAME | Postgres container name on the remote server. Defaults to db_1 . |
POSTGRES_DB | Comma or space separated list of postgres databases to backup. Required. |
POSTGRES_USER | Postgres connection parameter; postgres user to connect with. Required. |