You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I went through the process of downloading a recent prod database dump and restoring it into the stage ibutsu-server DB.
The steps looked something like:
Upload recent backup dump file to stage env PVC. This was done using the image quay.io/appuio/oc:v4.9 in the stage env. The steps looked like
oc new-app quay.io/appuio/oc:v4.9
oc env deployment/oc HOME=/tmp
Attach the stage postgresql PVC to the oc deployment (if ReadWriteOnce you have to scale the postgresql DC down to 1 pod)
oc debug deployment/oc
oc login to prod db
oc cp/oc rsync dump file to postgresql PVC
Scale the postgresql DC up again, drop the current ibutsu DB and restore pg_restore -v -C -d postgres < backup-ibutsu-<data>.dump
Scale up the backend, worker, and scheduler DC
It'd be nice if we did this regularly as a cronjob and had some automation around the process. Keeping the stage DB in sync with the prod DB will allow us to catch issues in the master branch of ibutsu that can't be caught in a local dev environment.
The text was updated successfully, but these errors were encountered:
Recently I went through the process of downloading a recent prod database dump and restoring it into the stage ibutsu-server DB.
The steps looked something like:
quay.io/appuio/oc:v4.9
in the stage env. The steps looked likeoc new-app quay.io/appuio/oc:v4.9
oc env deployment/oc HOME=/tmp
oc debug deployment/oc
oc login
to prod dboc cp
/oc rsync
dump file to postgresql PVCibutsu
DB and restorepg_restore -v -C -d postgres < backup-ibutsu-<data>.dump
It'd be nice if we did this regularly as a cronjob and had some automation around the process. Keeping the stage DB in sync with the prod DB will allow us to catch issues in the master branch of ibutsu that can't be caught in a local dev environment.
The text was updated successfully, but these errors were encountered: