Open
Conversation
Adds support to dump PostgreSQL databases that run inside Docker containers via `docker exec ... pg_dump`, mirroring the existing host-level postgresql backup flow. - New BAK_POSTGRESQL_CONTAINERS_* configuration block in config-dist/database.conf with default list/dump implementations (postgresql_container_databases, postgresql_container_dump). - New postgresql_containers_backup() and postgresql_container_check() in lib/main.sh, plus directory creation and config-show reporting. - backup.sh wires the new step into the main backup flow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for dumping PostgreSQL databases that run inside Docker containers, mirroring the existing host-level postgresql backup flow.
BAK_POSTGRESQL_CONTAINERS_*block inconfig-dist/database.confwith default list/dump implementations (postgresql_container_databases,postgresql_container_dump) usingdocker exec+pg_dump/psql.postgresql_containers_backup()andpostgresql_container_check()inlib/main.sh, plus directory creation and config-show reporting.backup.shwires the new step into the main backup flow afterpostgresql_databases_backup.Closes SER-1.
Test plan
bash -n backup.sh lib/main.sh config-dist/database.conf(passes locally)dockeravailable and a running pg container; verify a${date}-${container}-${db}.sqldump appears underdata/postgresql-containers/dockerinstalled; verify the step auto-disables (status2) without erroringbackup.sh -clists configured containers under "PostgreSQL Containers"