Skip to content

Commit

Permalink
Merge pull request #42 from integr8ly/INTLY-2129
Browse files Browse the repository at this point in the history
blacklist sampledb
  • Loading branch information
pb82 committed May 17, 2019
2 parents 06a773b + b3685e6 commit f45cf0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions image/tools/lib/component/postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
Expand Down

0 comments on commit f45cf0e

Please sign in to comment.