diff --git a/pkg/executor/nfs/nfsbkpresources.go b/pkg/executor/nfs/nfsbkpresources.go index 898614c5..38706412 100644 --- a/pkg/executor/nfs/nfsbkpresources.go +++ b/pkg/executor/nfs/nfsbkpresources.go @@ -314,9 +314,8 @@ func uploadResource( } } } else if len(backup.Spec.ExcludeResourceTypes) != 0 { - isPersistentVolumeType := IsPVCInExcludeResourceType(backup) exclude := backup.Spec.ExcludeResourceTypes - if isPersistentVolumeType { + if IsPVCInExcludeResourceType(backup) { exclude = append(exclude, "PersistentVolume") } excludeTypeObjects, _, err := rc.GetResourcesExcludingTypes(