-
Notifications
You must be signed in to change notification settings - Fork 36
Manual Syncing of DEV to TEST to PROD
In the case where the Django migrations are out-of-sync, it will be necessary to:
a) deploy to the lower environment (e.g DEV) successfully, and export that DB (simplest to do on the postgres pod, as opposed to the gwells pod). Wait at the "Deploy to <>' Jenkins GUI prompt.
pg_dump -d gwells -U userGN0 -Fc --no-privileges --no-tablespaces --schema=public > gwells-dev-recover.dmp
b) rsync that *.dmp file to the local machine
oc rsync postgresql-47-t7xmr:/tmp/recover/ .
c) rsync that *.dmp file to the higher environment (e.g. TEST). Again, the postgres pod is simplest.
oc rsync recover postgresql-12-m3941:/tmp
d) scale down the gwells application server pod (to avoid exclusive locks and to lock out users) via the OpenShift console
e) restore the DB into the higher environment
pg_restore -d gwells --no-owner --no-privileges -U userXMW gwells-test.dmp
f) Proceed with the 'Deploy to <>' on the Jenkins GUI Console
g) scale up the gwells application server pod via the OpenShift console
- Working on GWELLS (full workflow from writing code to deploying to prod)
- Water terminologies
- Testing
- Swagger Documentation
- Restore a database backup manually
- (Archived) Manual Syncing of DEV to TEST to PROD
- (Archived) Setup GWells data migration for local dev test
- Update PostGres Oracle Foreign Data Wrapper image
- Increase PostgreSQL Database storage
- (Archived) Regular Corruption of the PostgreSQL DB
- (Archived) Recovering from a corrupt PostgreSQL Database