restore

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 60 Imported by: 20

Documentation

Index

Constants

View Source
const (
	ItemRestoreResultCreated = "created"
	ItemRestoreResultUpdated = "updated"
	ItemRestoreResultFailed  = "failed"
	ItemRestoreResultSkipped = "skipped"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChosenGroupVersion added in v1.6.0

type ChosenGroupVersion struct {
	Group   string
	Version string
	Dir     string
}

ChosenGroupVersion is the API Group version that was selected to restore from potentially multiple backed up version enabled by the feature flag APIGroupVersionsFeatureFlag

type PVRestorer added in v0.9.0

type PVRestorer interface {
	// contains filtered or unexported methods
}

type Request added in v1.0.1

type Request struct {
	*velerov1api.Restore

	Log              logrus.FieldLogger
	Backup           *velerov1api.Backup
	PodVolumeBackups []*velerov1api.PodVolumeBackup
	VolumeSnapshots  []*volume.Snapshot
	BackupReader     io.Reader
	RestoredItems    map[itemKey]restoredItemStatus

	ResourceModifiers        *resourcemodifiers.ResourceModifiers
	DisableInformerCache     bool
	CSIVolumeSnapshots       []*snapshotv1api.VolumeSnapshot
	BackupVolumeInfoMap      map[string]volume.BackupVolumeInfo
	RestoreVolumeInfoTracker *volume.RestoreVolumeInfoTracker
	// contains filtered or unexported fields
}

func (*Request) GetItemOperationsList added in v1.11.0

func (r *Request) GetItemOperationsList() *[]*itemoperation.RestoreOperation

GetItemOperationsList returns ItemOperationsList, initializing it if necessary

func (*Request) RestoredResourceList added in v1.11.0

func (r *Request) RestoredResourceList() map[string][]string

RestoredResourceList returns the list of restored resources grouped by the API Version and Kind

type Restorer

type Restorer interface {
	// Restore restores the backup data from backupReader, returning warnings and errors.
	Restore(req *Request,
		actions []riav2.RestoreItemAction,
		volumeSnapshotterGetter VolumeSnapshotterGetter,
	) (results.Result, results.Result)
	RestoreWithResolvers(
		req *Request,
		restoreItemActionResolver framework.RestoreItemActionResolverV2,
		volumeSnapshotterGetter VolumeSnapshotterGetter,
	) (results.Result, results.Result)
}

Restorer knows how to restore a backup.

func NewKubernetesRestorer

func NewKubernetesRestorer(
	discoveryHelper discovery.Helper,
	dynamicFactory client.DynamicFactory,
	resourcePriorities types.Priorities,
	namespaceClient corev1.NamespaceInterface,
	podVolumeRestorerFactory podvolume.RestorerFactory,
	podVolumeTimeout time.Duration,
	resourceTerminatingTimeout time.Duration,
	resourceTimeout time.Duration,
	logger logrus.FieldLogger,
	podCommandExecutor podexec.PodCommandExecutor,
	podGetter cache.Getter,
	credentialStore credentials.FileStore,
	kbClient crclient.Client,
	multiHookTracker *hook.MultiHookTracker,
) (Restorer, error)

NewKubernetesRestorer creates a new kubernetesRestorer.

type VolumeSnapshotterGetter added in v1.0.0

type VolumeSnapshotterGetter interface {
	GetVolumeSnapshotter(name string) (vsv1.VolumeSnapshotter, error)
}

Directories

Path Synopsis
csi

Jump to

Keyboard shortcuts

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