You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flags.StringVar(&o.FromBackup, "from-backup", o.FromBackup, "Backup to restore from (required).")
114
-
flags.Var(&o.IncludeResources, "include-resources", "Resources to include in the restore, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources). Cannot work with include-cluster-scoped-resources, exclude-cluster-scoped-resources, include-namespace-scoped-resources and exclude-namespace-scoped-resources.")
115
-
flags.Var(&o.ExcludeResources, "exclude-resources", "Resources to exclude from the restore, formatted as resource.group, such as storageclasses.storage.k8s.io. Cannot work with include-cluster-scoped-resources, exclude-cluster-scoped-resources, include-namespace-scoped-resources and exclude-namespace-scoped-resources.")
116
-
flags.Var(&o.IncludeClusterScopedResources, "include-cluster-scoped-resources", "Cluster-scoped resources to include in the restore, formatted as resource.group, such as storageclasses.storage.k8s.io(use '*' for all resources). Cannot work with include-resources, exclude-resources and include-cluster-resources.")
117
-
flags.Var(&o.ExcludeClusterScopedResources, "exclude-cluster-scoped-resources", "Cluster-scoped resources to exclude from the restore, formatted as resource.group, such as storageclasses.storage.k8s.io(use '*' for all resources). Cannot work with include-resources, exclude-resources and include-cluster-resources.")
118
-
flags.Var(&o.IncludeNamespaceScopedResources, "include-namespace-scoped-resources", "Namespaced resources to include in the restore, formatted as resource.group, such as deployments.apps(use '*' for all resources). Cannot work with include-resources, exclude-resources and include-cluster-resources.")
119
-
flags.Var(&o.ExcludeNamespaceScopedResources, "exclude-namespace-scoped-resources", "Namespaced resources to exclude from the restore, formatted as resource.group, such as deployments.apps(use '*' for all resources). Cannot work with include-resources, exclude-resources and include-cluster-resources.")
110
+
flags.Var(&o.IncludeResources, "include-resources", "Resources to include in the restore, formatted as resource.group, such as storageclasses.storage.k8s.io (use '*' for all resources).")
111
+
flags.Var(&o.ExcludeResources, "exclude-resources", "Resources to exclude from the restore, formatted as resource.group, such as storageclasses.storage.k8s.io.")
120
112
flags.Var(&o.Labels, "labels", "Labels to apply to the restore.")
121
113
flags.Var(&o.Annotations, "annotations", "Annotations to apply to the restore.")
122
114
// Note: namespace-mappings are restricted for non-admin users and therefore not exposed
@@ -215,6 +207,10 @@ func (o *CreateOptions) buildRestore() *nacv1alpha1.NonAdminRestore {
215
207
restoreSpec.ExcludedResources=o.ExcludeResources
216
208
}
217
209
210
+
// Note: The namespace-scoped and cluster-scoped resource filters are only available
211
+
// in backup operations, not restore operations in Velero RestoreSpec.
212
+
// For restores, use IncludedResources/ExcludedResources with specific resource types.
213
+
218
214
// Note: Namespace mappings are restricted for non-admin users and therefore not processed
0 commit comments