The imixs/postgres Docker image runs a backup service for Postgres Databases using the official postgres image.
The image runs version Postgres 12.2 and provides an backup and restore scripts. The backup feature can be configured in the same way as the imixs/backup image. See details here. The image does not start a postgres database. The goal of the image is providing a backup/restore service for postgres services.
- inherit form official postgres image
- backup script to backup a database locally
- restore script to restore from a local backup
- remote backup script to create a remote rolling backup on a ftp space
- remote restore script to restore a remote backup from a ftp space
Follow the Docker installation instructions for your host system.
You can start an instance of the postgres service with the Docker run command:
docker run --name="postgres" -it --rm \
-e SETUP_CRON="* 5 * * *" \
-e BACKUP_DB_PASSWORD="xxxxxxxxxxx" \
-e BACKUP_DB_HOST="db" \
-e BACKUP_DB_TYPE="POSTGRES" \
-e BACKUP_DB="wordpress" \
imixs/postgres
The source is available on Github. Please report any issues.
To build the image from the Dockerfile source file run:
docker build --tag=imixs/postgres .
To test the backup service in interactive mode start the docker service:
docker run --name="postgres" -it --rm \
-e SETUP_CRON="*/1 * * * *" \
-e BACKUP_DB_PASSWORD="xxxxxxxxxxx" \
-e BACKUP_DB_HOST="db" \
-e BACKUP_DB_TYPE="POSTGRES" \
-e BACKUP_DB="wordpress" \
imixs/postgres
This will trigger the backup every minute.