You can use Velero to restore specific CNF persisent volumes in the same workload cluster.

Prerequisites

Install and Configure Velero Add-On for the Workload Clusters.

Procedure

  1. Log in to the VMware Telco Cloud Automation web interface.
  2. Navigate to Infrastructure > Virtual Infrastructure.
  3. Open the web terminal by clicking Options (three dots) corresponding to the workload cluster you want to back up and then selecting Open Terminal.
  4. On the web terminal, check the service health of Velero by running the following command:
    # kubectl get pod -n velero 
    # kubectl get bsl -n velero
  5. Get backup information.
    # velero backup get
  6. Delete the CNF application k8s resources and old pv that will be restored from a backup. Note: Refer to CNF's inventory page from TCA UI to determine which kind of controller the CNF is using, for example, when the CNF's controller is Deployment, delete the deployment CR:
    # kubectl -n <cnf-namespaces-by-comma> delete deployment <example-cnf-deployment-resources>
    # kubectl -n <cnf-namespaces-by-comma> delete pvc <example-cnf-pvc-bounding-to-pv>
  7. Restore PVC/PV. Note: "pod" should also be included if it is a NFS PV restore.
    # velero restore create --from-backup <some-backup-include-pv/pvc/pod> --include-resources pvc,pv(,pod)
  8. Check backup status and related CR and wait until the processes are "Completed".
    # velero restore get // check the restore status

    If the restoration contains PV backup using velero-plugin-for-vsphere, check the status of downloads CR.

    # kubectl get downloads -n velero // get the download-name 
    # kubectl get downloads <download-name> -o yaml // check the downloads status in yaml output

    If the restoration contains PV data backup using Restic, check the status of podvolumerestores CR.

    # kubectl get podvolumerestores -n velero // get the podvolumerestore-name 
    # kubectl get podvolumerestores <podvolumebackup-name> -o yaml // check the podvolumerestores status in yaml output
  9. Reconfigure the CNF from TCA UI with empty json file to override values. It will create a new deployment using the restored PVs. If there are new pods created, delete the legacy ones manually. Note: During "Overrides values" step, please upload an empty json file with content "{}" or empty yaml file with content "---".