title | menuTitle | description | weight | disableToc | tags | |||
---|---|---|---|---|---|---|---|---|
Kahu User Guide |
User Guide |
User guide for the Kahu (Container Data Backup & Restore) project |
10 |
false |
|
Kahu features can be realised through deployment on kubernetes(k8s) cluster. For kahu deployment steps and options, please refer deployment guide
Follow below steps to experience typical usecase which kahu provides
- Clone kahu project to get usage examples
git clone https://github.com/soda-cdm/kahu.git
cd kahu/examples
- Create backup location. In this example, backup location is created using nfs provider
kubectl create -f backuplocation.yaml
-
Create an application with its all resources at "deafult" namespace.
-
Create backup object at namespace level
kubectl apply -f backup-namespace.yaml
- Verify the state of backup object in the cluster
kubectl get backups
- Once the backup stage is "Finished", restore an application from backup by creating restore object. Edit restore.yaml to update "backupName" and "namespaceMapping" with desired values. This sample yaml uses "restore-ns" as the namespace to restore resources of "default" namespace
kubectl apply -f restore.yaml
- Verify the state of restore object in the cluster
kubectl get restores
- Once the restore stage is "Finished", verify the restore of application resources by checking resources as "restore-ns" namespace
kubectl get all -n restore-ns
-
Create 2 pods namely pod1234, pod5678 in "default" namespace
-
Create backup object to backup only pod1234
kubectl apply -f backup-specific-resource.yaml
- Verify the state of backup object in the cluster
kubectl get backups
- Once the backup stage is "Finished", restore an application from backup by creating restore object. Edit restore.yaml to update "backupName" and "namespaceMapping" with desired values. This sample yaml uses "restore-ns" as the namespace to restore resources of "default" namespace
kubectl apply -f restore.yaml
- Verify the state of restore object in the cluster
kubectl get restores
- Once the restore stage is "Finished", verify the restore of application resources by checking resources as "restore-ns" namespace. Only pod1234 is expected to be restored back
kubectl get all -n restore-ns