oadp

package
v0.1.71 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateBackupCommand

func NewCreateBackupCommand() *cobra.Command

func NewCreateRestoreCommand

func NewCreateRestoreCommand() *cobra.Command

func NewCreateScheduleCommand

func NewCreateScheduleCommand() *cobra.Command

Types

type CreateOptions

type CreateOptions struct {
	// Required flags (common)
	HCName      string
	HCNamespace string

	// Restore-specific required flags
	BackupName   string
	ScheduleName string

	// Schedule-specific required flags
	Schedule string

	// Optional flags with defaults (common)
	OADPNamespace string
	Render        bool

	// Backup-specific optional flags
	BackupCustomName         string
	StorageLocation          string
	TTL                      time.Duration
	SnapshotMoveData         bool
	DefaultVolumesToFsBackup bool
	IncludedResources        []string

	// Restore-specific optional flags
	RestoreName            string
	ExistingResourcePolicy string
	IncludeNamespaces      []string
	RestorePVs             *bool
	PreserveNodePorts      *bool

	// Schedule-specific optional flags
	Paused             bool
	UseOwnerReferences bool
	SkipImmediately    bool

	// Client context (common)
	Log    logr.Logger
	Client client.Client
}

CreateOptions contains all configuration for both backup and restore operations

func (*CreateOptions) GenerateBackupObjectWithPlatform

func (o *CreateOptions) GenerateBackupObjectWithPlatform(platform string) (*unstructured.Unstructured, string, error)

func (*CreateOptions) GenerateRestoreObject

func (o *CreateOptions) GenerateRestoreObject() (*unstructured.Unstructured, string, error)

func (*CreateOptions) GenerateScheduleObject

func (o *CreateOptions) GenerateScheduleObject(platform string) (*unstructured.Unstructured, string, error)

func (*CreateOptions) RunBackup

func (o *CreateOptions) RunBackup(ctx context.Context) error

func (*CreateOptions) RunRestore

func (o *CreateOptions) RunRestore(ctx context.Context) error

func (*CreateOptions) RunSchedule

func (o *CreateOptions) RunSchedule(ctx context.Context) error

func (*CreateOptions) ValidateBackupName

func (o *CreateOptions) ValidateBackupName() error

ValidateBackupName validates the custom backup name if provided

func (*CreateOptions) ValidateRestoreName

func (o *CreateOptions) ValidateRestoreName() error

ValidateRestoreName validates the custom restore name if provided

func (*CreateOptions) ValidateScheduleName

func (o *CreateOptions) ValidateScheduleName() error

ValidateScheduleName validates the custom schedule name if provided

func (*CreateOptions) ValidateSchedulePace

func (o *CreateOptions) ValidateSchedulePace() error

Jump to

Keyboard shortcuts

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