staging-sync/koji: connect to postgres db when restoring production db dump
This commit is contained in:
parent
47b9c9a42b
commit
65bc0b1bb3
1 changed files with 1 additions and 2 deletions
|
@ -69,7 +69,6 @@
|
|||
|
||||
- postgresql_user: name=koji password={{ kojiPassword }}
|
||||
- postgresql_db: name=koji state=absent
|
||||
- postgresql_db: name=koji owner=koji
|
||||
# buildroot_listing is excluded from the sync to save some time
|
||||
# TODO: install mbuffer on db-koji.stg
|
||||
- name: Import the prod db. This will take quite a while. Go get a snack!
|
||||
|
@ -80,7 +79,7 @@
|
|||
mbuffer -q -s 16M -m 256M -l /tmp/mbuffer-xz-to-sed.log |
|
||||
sed '/COPY buildroot_listing /,/\./d' |
|
||||
mbuffer -q -s 16M -m 512M -l /tmp/mbuffer-sed-to-psql.log |
|
||||
psql -v ON_ERROR_STOP=1 koji
|
||||
psql -v ON_ERROR_STOP=1
|
||||
- name: repoint all the prod rpm entries at the secondary volume (and other stuff)
|
||||
shell: psql -1 -v ON_ERROR_STOP=1 koji </var/lib/pgsql/koji-reset-staging.sql
|
||||
- name: vacuum database
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue