ZettaIO / restic-compose-backup

Automatic restic backup of a docker-compose setup. https://hub.docker.com/r/zettaio/restic-compose-backup
MIT License
29 stars 16 forks source link

Use docker exec to create database backups #29

Open jannikw opened 4 years ago

jannikw commented 4 years ago

This is an alternative implementation for doing database backups using the docker exec functionalities. Database pings to check for availability and database dumps are done by executing the respective programs inside the database containers.

For the database dumps, the low level docker api has to be used, because it otherwise not possible to retrieve an exit code and use streaming of the commands output to stdout and stderr.

I tested this with the provided docker-compose.yml and with the database containers running in different projects and therefore belonging to different networks.

Fixes #28