# velero backup create <example-backup> --exclude-namespaces=$TCA_VELERO_EXCLUDE_NAMESPACES --exclude-resources=$TCA_VELERO_EXCLUDE_RESOURCES
The above backup command uses velero-plugin-for-vsphere as default to back up the Persistent Volumes created with vSphere CSI storage class. If the cluster exists in Persistent Volumes created with nfs-client storage class to back up, you have two options:
Option 1: Anotate the pod which mounts volumes to Persistent Volumes created with nfs-client storage class to backup using Restic.
# kubectl -n <pod_namespace> annotate pod/<pod-name> backup.velero.io/backup-volumes=<volume-name1>,<volume-name2>,…
# velero backup create <example-backup> --exclude-namespaces=$TCA_VELERO_EXCLUDE_NAMESPACES --exclude-resources=$TCA_VELERO_EXCLUDE_RESOURCES
You can choose to add the above annotation to the template metadata in the deployment controller to avoid re-annotating in case the annotated pods restart.
# kubectl -n <deploy_namespace> patch deployment <deployment-name> -p '{"spec": {"template":{"metadata":{"annotations":{"backup.velero.io/backup-volumes":"<volume-name1>,<volume-name2>,…"}}}}}'
Option 2: Change the default PV backup plugin to Restic. This will allow Restic to back up all the types of Persistent Volumes, including the ones created with vSphere CSI plugin.
# velero backup create <example-backup> --default-volumes-to-fs-backup --exclude-namespaces=$TCA_VELERO_EXCLUDE_NAMESPACES --exclude-resources=$TCA_VELERO_EXCLUDE_RESOURCES