Skip to content

Create Backup with all resources except deployment and pod and then restore the backup #170

@avinashchaturvedi2002

Description

@avinashchaturvedi2002

Testcase Precondition:

  1. Kahu project installed in given name-space (test-kahu)
  2. All below pods should be up and running:
    a. backup service
    b. Meta service with nfs provider
    c. nfs-server
  3. Metadata location is created already
  4. Namespace test-ns is created and contains
    some of the kubernetes resources
    5.Namespace restore-ns is created

Testcase Steps:

  1. Check if Kahu project is installed in the given namespace (test-kahu)
  2. Check if the following pods are up and running: a. backup service b. Meta service with NFS provider c. NFS server
  3. Check if the metadata location is already created
  4. Create a few Kubernetes resources in the test-ns namespace for testing purposes
  5. Create a backup using the following command: kubectl backup create --include-resources=all --exclude-resources=pod,deployment --namespace=test-ns
  6. Verify that the backup was created successfully by checking the metadata location
  7. Delete the test-ns namespace using the following command: kubectl delete ns test-ns
  8. Verify that the test-ns namespace was deleted successfully by running the following command: kubectl get ns
  9. Create a new namespace called restore-ns using the following command: kubectl create ns restore-ns
  10. Restore the backup into the restore-ns namespace using the following command: kubectl backup restore --namespace=restore-ns
  11. Verify that the resources were restored successfully into the restore-ns namespace by running the following command: kubectl get all -n restore-ns
  12. Compare the restored resources with the original resources to ensure that the restore process was successful
    Test Case Result:
    The backup and restore process should be successful and all resources except pod and deployment should be restored to the restore-ns namespace. The restored resources should be the same as the original resources before the backup was taken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions