backup

package
v1.12.2-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 29 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(f client.Factory) *cobra.Command

func NewCreateCommand

func NewCreateCommand(f client.Factory, use string) *cobra.Command

func NewDeleteCommand

func NewDeleteCommand(f client.Factory, use string) *cobra.Command

NewDeleteCommand creates a new command that deletes a backup.

func NewDescribeCommand

func NewDescribeCommand(f client.Factory, use string) *cobra.Command

func NewDownloadCommand added in v0.4.0

func NewDownloadCommand(f client.Factory) *cobra.Command

func NewGetCommand

func NewGetCommand(f client.Factory, use string) *cobra.Command

func NewLogsCommand added in v0.4.0

func NewLogsCommand(f client.Factory) *cobra.Command

func ParseOrderedResources added in v1.9.0

func ParseOrderedResources(orderMapStr string) (map[string]string, error)

ParseOrderedResources converts to map of Kinds to an ordered list of specific resources of that Kind. Resource names in the list are in format 'namespace/resourcename' and separated by commas. Key-value pairs in the mapping are separated by semi-colon. Ex: 'pods=ns1/pod1,ns1/pod2;persistentvolumeclaims=ns1/pvc4,ns1/pvc8'.

func Run added in v0.10.0

func Run(o *cli.DeleteOptions) error

Run performs the delete backup operation.

Types

type CreateOptions

type CreateOptions struct {
	Name                            string
	TTL                             time.Duration
	SnapshotVolumes                 flag.OptionalBool
	SnapshotMoveData                flag.OptionalBool
	DataMover                       string
	DefaultVolumesToFsBackup        flag.OptionalBool
	IncludeNamespaces               flag.StringArray
	ExcludeNamespaces               flag.StringArray
	IncludeResources                flag.StringArray
	ExcludeResources                flag.StringArray
	IncludeClusterScopedResources   flag.StringArray
	ExcludeClusterScopedResources   flag.StringArray
	IncludeNamespaceScopedResources flag.StringArray
	ExcludeNamespaceScopedResources flag.StringArray
	Labels                          flag.Map
	Selector                        flag.LabelSelector
	OrSelector                      flag.OrLabelSelector
	IncludeClusterResources         flag.OptionalBool
	Wait                            bool
	StorageLocation                 string
	SnapshotLocations               []string
	FromSchedule                    string
	OrderedResources                string
	CSISnapshotTimeout              time.Duration
	ItemOperationTimeout            time.Duration
	ResPoliciesConfigmap            string
	// contains filtered or unexported fields
}

func NewCreateOptions

func NewCreateOptions() *CreateOptions

func (*CreateOptions) BindFlags

func (o *CreateOptions) BindFlags(flags *pflag.FlagSet)

func (*CreateOptions) BindFromSchedule added in v1.2.0

func (o *CreateOptions) BindFromSchedule(flags *pflag.FlagSet)

BindFromSchedule binds the from-schedule flag separately so it is not called by other create commands that reuse CreateOptions's BindFlags method.

func (*CreateOptions) BindWait added in v0.10.0

func (o *CreateOptions) BindWait(flags *pflag.FlagSet)

BindWait binds the wait flag separately so it is not called by other create commands that reuse CreateOptions's BindFlags method.

func (*CreateOptions) BuildBackup added in v1.2.0

func (o *CreateOptions) BuildBackup(namespace string) (*velerov1api.Backup, error)

func (*CreateOptions) Complete

func (o *CreateOptions) Complete(args []string, f client.Factory) error

func (*CreateOptions) Run

func (*CreateOptions) Validate

func (o *CreateOptions) Validate(c *cobra.Command, args []string, f client.Factory) error

type DownloadOptions added in v0.4.0

type DownloadOptions struct {
	Name                  string
	Output                string
	Force                 bool
	Timeout               time.Duration
	InsecureSkipTLSVerify bool
	// contains filtered or unexported fields
}

func NewDownloadOptions added in v0.4.0

func NewDownloadOptions() *DownloadOptions

func (*DownloadOptions) BindFlags added in v0.4.0

func (o *DownloadOptions) BindFlags(flags *pflag.FlagSet)

func (*DownloadOptions) Complete added in v0.4.0

func (o *DownloadOptions) Complete(args []string) error

func (*DownloadOptions) Run added in v0.4.0

func (*DownloadOptions) Validate added in v0.4.0

func (o *DownloadOptions) Validate(c *cobra.Command, args []string, f client.Factory) error

type LogsOptions added in v1.12.0

type LogsOptions struct {
	Timeout               time.Duration
	InsecureSkipTLSVerify bool
	CaCertFile            string
	Client                kbclient.Client
	BackupName            string
}

func NewLogsOptions added in v1.12.0

func NewLogsOptions() LogsOptions

func (*LogsOptions) BindFlags added in v1.12.0

func (l *LogsOptions) BindFlags(flags *pflag.FlagSet)

func (*LogsOptions) Complete added in v1.12.0

func (l *LogsOptions) Complete(args []string, f client.Factory) error

func (*LogsOptions) Run added in v1.12.0

func (l *LogsOptions) Run(c *cobra.Command, f client.Factory) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL