Manual backup creation
Before you begin
Manual backup process assumes automated backup workflow is already configured and working properly.
Manual backup process invokes same Kubernetes cronjobs as for automated process.
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:
MongoDB
PostgreSQL
MinIO
InfluxDB
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 "influxdb-backup-job" deleted job.batch/influxdb-backup-job created job.batch "minio-backup-job" deleted job.batch/minio-backup-job created job.batch "mongodb-backup-job" deleted job.batch/mongodb-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 influxdb-backup-29384700 Complete 1/1 12s 6h9m influxdb-backup-job Complete 1/1 12s 2m31s minio-backup-29384700 Complete 1/1 9s 6h9m minio-backup-job Complete 1/1 10s 2m30s mongodb-backup-29384700 Complete 1/1 18s 6h9m mongodb-backup-job Complete 1/1 16s 2m29s 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 (MongoDB) backup
Connect to your cluster with
kubectlChange namespace to opencrvs-deps-<environment>:
Run following command to trigger MongoDB backup:
Example output:
Verify MongoDB 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