kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
452 stars 103 forks source link

Multiple databases #20

Closed kaspernj closed 4 years ago

kaspernj commented 4 years ago

I have an app that uses multiple databases (one per customer). Those databases are spread out on multiple servers with several customers databases on each.

Obviously I will have to run an instance of docker-pg-backup on each. I would love to just dump all of them in a single dump, but it is only possible to specify a single database name.

Is it possible to support multiple databases?

NyakudyaA commented 4 years ago

@kaspernj this image will backup all databases in a cluster no matter how many they are https://github.com/kartoza/docker-pg-backup/blob/master/backups.sh#L21. If you have two databases in a cluster ie gis,data it will create two dump files each corresponding to the DB

kaspernj commented 4 years ago

@NyakudyaA That sounds great! I didn't notice that. Thanks for the quick response :-)