BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
42 stars 56 forks source link

Support for multiple table schemas #28

Open mark-walle opened 5 years ago

mark-walle commented 5 years ago

The verifyBackup function on (this line)[https://github.com/BCDevOps/backup-container/blob/59699357cc6908bc9f1d29c907eec54fffc86762/docker/backup.sh#L1198] uses a WHERE table_schema='${TABLE_SCHEMA}' condition, with TABLE_SCHEMA defaulting to public.

This works well when there is only one table schema value; however, across multiple databases or even within the same database, there may be multiple differing table schema values. In that case, the condition above would miss those schema.

WadeBarnes commented 5 years ago

Initial support, as described above was added in PR #29.

Support for changing the TABLE_SCHEMA on a per database level would need to be added to the database specification in the settings/config.

Perhaps something like this; <Hostname/>[:<Port/>]/<DatabaseName/>[.<SchemaName/>] postgresql:5432/TheOrgBook_Database.my_schema Where: