Manual backup creation
Before you begin
Reasons for manual backup:
Before environment reset
Before OpenCRVS or dependencies upgrade
Migration to new hardware or cloud
Off-boarding from OpenCRVS
Following components are backed up:
PostgreSQL
MinIO
Running all components backup
Connect to your cluster with
kubectlChange namespace to opencrvs-deps-<environment>:
kubectl config set-context --current --namespace=opencrvs-deps-<environment>Run following command to trigger backup jobs for all components:
for cj in $(kubectl get cronjob -l job-type=backup -o jsonpath='{.items[*].metadata.name}'); do \ kubectl delete job $cj-job --ignore-not-found; \ kubectl create job --from=cronjob/$cj $cj-job; \ doneExample output:
job.batch "minio-backup-job" deleted job.batch/minio-backup-job created job.batch "postgres-backup-job" deleted job.batch/postgres-backup-job createdVerify all jobs completed without issues:
kubectl get job -ljob-type=backupExample output: Check job names like
*-backup-jobwithout ending number, jobs with number were triggered per schedule:NB01NSTL012:~ vmudryi$ kubectl get job -ljob-type=backup NAME STATUS COMPLETIONS DURATION AGE minio-backup-29384700 Complete 1/1 9s 6h9m minio-backup-job Complete 1/1 10s 2m30s postgres-backup-29384700 Complete 1/1 12s 6h9m postgres-backup-job Complete 1/1 12s 2m28sSSH (Login) to backup server and verify backup was completed successfully.
Running Single component (PostgreSQL) backup
Connect to your cluster with
kubectlChange namespace to opencrvs-deps-<environment>:
Run following command to trigger PostgreSQL backup:
Example output:
Verify PostgreSQL backup completed successfully:
Example output:
Verify backup was created
SSH (Login) to backup server
Become backup user:
Check backup directory content:
Example output:
Last updated