Automated backup configuration
Automated backup configuration
If backup server is in your environment inventory file then add following section to environments/<environment>/dependencies/values.yaml and run "Deploy dependencies" workflow:
Update
backup_server_dirvalue to match with your environment name, e/gdevelopmentUpdate
scheduleto reflect best time backup job to be started,Set
enabledtotrue
# Backup configuration
backup:
enabled: true
schedule: "0 1 * * *"
backup_server_dir: /home/backup/<environment>Push your changes to GitHub and Re-Deploy Dependencies
If backup server was provisioned as part of any other environments or is a third-party server, then please follow guide from helm chart, see Backup configuration.
Verify backup configuration
Verify kubernetes jobs are present:
Connect to your cluster with
kubectlRun following command:
kubectl get cronjob -l job-type=backup -n opencrvs-deps-<environment>Example output:
NAME SCHEDULE TIMEZONE SUSPEND ACTIVE LAST SCHEDULE AGE influxdb-backup 0 1 * * * <none> False 0 5h9m 20h minio-backup 0 1 * * * <none> False 0 5h9m 13h mongodb-backup 0 1 * * * <none> False 0 5h9m 20h postgres-backup 0 1 * * * <none> False 0 5h9m 20h
Verify Kubernetes jobs were executed per schedule:
Wait at least for first job execution, usually takes at to 24 hours
Connect to your cluster with
kubectlRun following command:
Example output:
Verify backup files are present on backup server
SSH (Login) to backup server
Become backup user:
Check backup directory content:
Example output:
Last updated