check that the hg-repos volume is empty (there should only be a bunch of empty folders)
check that the postgres db is empty (save for the migrations table?)
restore the backup into a emptyDir volume on the job
validation???
copy the hg-repos backup into the hg-repos volume
restore postgres with a command like this (untested) pg_restore -U postgres -v -h db.languagedepot -d $PGDATABASE /dump/postgres-backup, this may have issues because lexbox already created the schema, in which case it probably make the most sense to also use the -c flag which will clean the db before the restore process.
Describe the feature Right now we have the backup job here https://github.com/sillsdev/languageforge-lexbox/blob/17987f3510a725a2369673d587e6d460c2f59c8c/deployment/production/backup.yaml I would like to make a similar job (which is manually ran) which will restore from back to the local instance of lexbox. Here's the workflow
pg_restore -U postgres -v -h db.languagedepot -d $PGDATABASE /dump/postgres-backup
, this may have issues because lexbox already created the schema, in which case it probably make the most sense to also use the-c
flag which will clean the db before the restore process.Who is this feature for? k8s admins