mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-20 22:26:07 +00:00
@@ -81,7 +81,7 @@ type CreateOptions struct {
|
||||
Name string
|
||||
TTL time.Duration
|
||||
SnapshotVolumes flag.OptionalBool
|
||||
DefaultRestic flag.OptionalBool
|
||||
DefaultVolumesToRestic flag.OptionalBool
|
||||
IncludeNamespaces flag.StringArray
|
||||
ExcludeNamespaces flag.StringArray
|
||||
IncludeResources flag.StringArray
|
||||
@@ -125,7 +125,7 @@ func (o *CreateOptions) BindFlags(flags *pflag.FlagSet) {
|
||||
f = flags.VarPF(&o.IncludeClusterResources, "include-cluster-resources", "", "include cluster-scoped resources in the backup")
|
||||
f.NoOptDefVal = "true"
|
||||
|
||||
f = flags.VarPF(&o.DefaultRestic, "default-restic", "", "use restic by default to backup all pod volumes")
|
||||
f = flags.VarPF(&o.DefaultVolumesToRestic, "default-volumes-to-restic", "", "use restic by default to backup all pod volumes")
|
||||
f.NoOptDefVal = "true"
|
||||
}
|
||||
|
||||
@@ -299,8 +299,8 @@ func (o *CreateOptions) BuildBackup(namespace string) (*velerov1api.Backup, erro
|
||||
if o.IncludeClusterResources.Value != nil {
|
||||
backupBuilder.IncludeClusterResources(*o.IncludeClusterResources.Value)
|
||||
}
|
||||
if o.DefaultRestic.Value != nil {
|
||||
backupBuilder.DefaultRestic(*o.DefaultRestic.Value)
|
||||
if o.DefaultVolumesToRestic.Value != nil {
|
||||
backupBuilder.DefaultVolumesToRestic(*o.DefaultVolumesToRestic.Value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user