Skip to content

Commit

Permalink
Merge pull request #38 from ministryofjustice/NIT-1098-alfresco-autom…
Browse files Browse the repository at this point in the history
…ate-data-refresh-process-parallel-db-dump-restore

NIT-1098 dump and restore db in parallel
  • Loading branch information
pete-j-g authored Mar 22, 2024
2 parents e0a592a + 33a0791 commit 7ab5b0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jobs/refresh-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ data:
chmod 0600 ~/.pgpass
set -x
pg_dump --host="$SRC_DB_HOST" --username="$SRC_DB_USER" --format=custom --no-owner --no-privileges --verbose --file=/tmp/db.dump $SRC_DB_NAME
pg_restore --host="$DST_DB_HOST" --username="$DST_DB_USER" --clean --no-owner --verbose --dbname="$DST_DB_NAME" /tmp/db.dump
rm -v /tmp/db.dump ~/.pgpass
pg_dump --jobs=4 --host="$SRC_DB_HOST" --username="$SRC_DB_USER" --dbname="$SRC_DB_NAME" --no-owner --no-privileges --verbose --format=directory --file=/tmp/db-dump
pg_restore --jobs=4 --host="$DST_DB_HOST" --username="$DST_DB_USER" --dbname="$DST_DB_NAME" --clean --if-exists --no-owner --no-privileges --verbose /tmp/db-dump
rm -rv /tmp/db-dump ~/.pgpass
---
apiVersion: batch/v1
kind: Job
Expand Down

0 comments on commit 7ab5b0b

Please sign in to comment.