This article provides a detailed walkthrough for managing Dgraph backups and restoration within your on-premises environment. Proper configuration of the stitchit service ensures that graph data is preserved and recoverable in the event of a system failure or data loss scenario.
This guide provides detailed procedures for backup and restore of Dgraph in on-premises Kubernetes Provider Connectivity Assurance deployments.
Prerequisites
kubectlaccess to the Provider Connectivity Assurance clusterSSH access to cluster nodes (for restoration)
Familiarity with OpenEBS local storage paths
Backup Overview
Dgraph backups are managed by the stitchit service using configuration from the stitchit-env-config ConfigMap. Unlike other components that use CronJobs, Dgraph backup scheduling is controlled through this ConfigMap.
View the backup configuration:
kubectl describe configmap -n pca stitchit-env-configKey configuration values:
Setting | Description |
|---|---|
| MinIO bucket path for backups |
| MinIO server endpoint |
| Cron expression for backup timing |
| Retention period (e.g., |
Default behavior:
Runs daily at 04:00 UTC
Writes backups to the local MinIO storage backend
Retains backups for 15 days
Manual Backup Trigger
You can trigger a Dgraph backup using the GraphQL admin API from any pod with curl:
kubectl exec -it -n pca airflow-0 -- shRetrieve the MinIO credentials:
kubectl exec -it -n pca pca-minio-pool-0-0 -- cat /tmp/minio/config.env | grep ROOTExecute the backup mutation:
curl -H "Content-Type: application/graphql" -X POST dgraphalpha1-0:8080/admin -d ' mutation { export(input: { destination: "minio://pca-minio-hl.pca.svc.cluster.local:9000/<bucket-name>?secure=false" accessKey: "<MINIO_ROOT_USER>" secretKey: "<MINIO_ROOT_PASSWORD>" }) { response { message code } } } 'Replace
<bucket-name>,<MINIO_ROOT_USER>, and<MINIO_ROOT_PASSWORD>with your actual values.
Alternative: Modify Backup Schedule
You can trigger an immediate backup by temporarily changing the schedule:
Edit the ConfigMap:
kubectl edit configmap -n pca stitchit-env-configChange
BACKUP_SCHEDULEto a time a few minutes in the future.Restart the
stitchitdeployment:kubectl rollout restart deploy -n pca stitchitAfter the backup completes, restore the original schedule.
Access Backups in MinIO
Connect to the MinIO pod:
kubectl exec -it -n pca pca-minio-pool-0-0 -- sh . /tmp/minio/config.envConfigure the MinIO client:
mc alias set --insecure pca https://localhost:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD"List available backups:
mc --insecure ls pca/<bucket-name>/dgraphBackup/v2/Copy a backup to the pod filesystem:
mc --insecure cp -r \ pca/<bucket-name>/dgraphBackup/v2/<backup-folder>/ \ /tmp/
Restore Procedure
Important: Dgraph restoration procedures are complex and depend on your specific deployment configuration. Contact Cisco TAC for guidance on restoring Dgraph data in your environment.
The general restoration approach involves:
Export the backup from MinIO to the admin VM
Stop Dgraph services
Clear existing Dgraph data
Import the backup using Dgraph's bulk loader or live loader
Restart services and validate
Post-Restore Validation
Verify Dgraph cluster health
Confirm data queries return expected results
Check dependent services are functioning correctly
Related Topics
© 2026 Cisco and/or its affiliates. All rights reserved.
For more information about trademarks, please visit: Cisco trademarks
For more information about legal terms, please visit: Cisco legal terms
For legal information about Accedian Skylight products, please visit: Accedian legal terms and trademarks