From b3685e6fb2ef5998d72d71845d717083339fac1d Mon Sep 17 00:00:00 2001 From: Peter Braun Date: Fri, 17 May 2019 18:13:08 +0200 Subject: [PATCH] blacklist sampledb --- image/tools/lib/component/postgres.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/image/tools/lib/component/postgres.sh b/image/tools/lib/component/postgres.sh index 81b7a69..9fb1bfa 100644 --- a/image/tools/lib/component/postgres.sh +++ b/image/tools/lib/component/postgres.sh @@ -55,6 +55,12 @@ function component_dump_data { fi else for db in $(${POSTGRES_PREFIX}/psql -U ${POSTGRES_USERNAME} -h ${POSTGRES_HOST} ${POSTGRES_DATABASE} -A -t -c '\l' | cut -f1 -d'|' | grep -v '=' | grep -v 'template'); do + # db blacklist goes here + # we don't want to dump 'sampledb' + if [ "$db" = "sampledb" ]; then + continue + fi + echo "dumping ${db}" ${POSTGRES_PREFIX}/pg_dump --clean --if-exists --oids -U ${POSTGRES_USERNAME} -h ${POSTGRES_HOST} ${db} | gzip > ${dest}/archives/${namespace}.${db}-${ts}.pg_dump.gz rc=$?