Documentation ¶
Index ¶
- Constants
- func GetBackupCSIResources(client kbclient.Client, globalCRClient kbclient.Client, ...) (volumeSnapshots []snapshotv1api.VolumeSnapshot, ...)
- func NewDeleteBackupRequest(name string, uid string) *velerov1api.DeleteBackupRequest
- func NewDeleteBackupRequestListOptions(name, uid string) metav1.ListOptions
- func NewSkipPVTracker() *skipPVTracker
- type BackupItemBlock
- type Backupper
- type FileForArchive
- type PVSkipReason
- type Request
- type SkippedPV
- type VolumeSnapshotterGetter
Constants ¶
const BackupFormatVersion = "1.1.0"
BackupFormatVersion is the current backup version for Velero, including major, minor, and patch.
const BackupVersion = 1
BackupVersion is the current backup major version for Velero. Deprecated, use BackupFormatVersion
Variables ¶
This section is empty.
Functions ¶
func GetBackupCSIResources ¶ added in v1.12.3
func GetBackupCSIResources( client kbclient.Client, globalCRClient kbclient.Client, backup *velerov1api.Backup, backupLog logrus.FieldLogger, ) ( volumeSnapshots []snapshotv1api.VolumeSnapshot, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent, volumeSnapshotClasses []snapshotv1api.VolumeSnapshotClass, )
GetBackupCSIResources is used to get CSI snapshot related resources. Returns VolumeSnapshot, VolumeSnapshotContent, VolumeSnapshotClasses referenced
func NewDeleteBackupRequest ¶ added in v0.8.0
func NewDeleteBackupRequest(name string, uid string) *velerov1api.DeleteBackupRequest
NewDeleteBackupRequest creates a DeleteBackupRequest for the backup identified by name and uid.
func NewDeleteBackupRequestListOptions ¶ added in v0.8.0
func NewDeleteBackupRequestListOptions(name, uid string) metav1.ListOptions
NewDeleteBackupRequestListOptions creates a ListOptions with a label selector configured to find DeleteBackupRequests for the backup identified by name and uid.
func NewSkipPVTracker ¶ added in v1.12.0
func NewSkipPVTracker() *skipPVTracker
Types ¶
type BackupItemBlock ¶ added in v1.15.0
func NewBackupItemBlock ¶ added in v1.15.0
func NewBackupItemBlock(log logrus.FieldLogger, itemBackupper *itemBackupper) *BackupItemBlock
type Backupper ¶
type Backupper interface { // Backup takes a backup using the specification in the velerov1api.Backup and writes backup and log data // to the given writers. Backup( logger logrus.FieldLogger, backup *Request, backupFile io.Writer, actions []biav2.BackupItemAction, itemBlockActions []ibav1.ItemBlockAction, volumeSnapshotterGetter VolumeSnapshotterGetter, ) error BackupWithResolvers( log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer, backupItemActionResolver framework.BackupItemActionResolverV2, itemBlockActionResolver framework.ItemBlockActionResolver, volumeSnapshotterGetter VolumeSnapshotterGetter, ) error FinalizeBackup( log logrus.FieldLogger, backupRequest *Request, inBackupFile io.Reader, outBackupFile io.Writer, backupItemActionResolver framework.BackupItemActionResolverV2, asyncBIAOperations []*itemoperation.BackupOperation, backupStore persistence.BackupStore, ) error }
Backupper performs backups.
func NewKubernetesBackupper ¶
func NewKubernetesBackupper( kbClient kbclient.Client, discoveryHelper discovery.Helper, dynamicFactory client.DynamicFactory, podCommandExecutor podexec.PodCommandExecutor, podVolumeBackupperFactory podvolume.BackupperFactory, podVolumeTimeout time.Duration, defaultVolumesToFsBackup bool, clientPageSize int, uploaderType string, pluginManager func(logrus.FieldLogger) clientmgmt.Manager, backupStoreGetter persistence.ObjectBackupStoreGetter, ) (Backupper, error)
NewKubernetesBackupper creates a new kubernetesBackupper.
type FileForArchive ¶ added in v1.11.0
type PVSkipReason ¶ added in v1.12.0
type Request ¶ added in v0.10.0
type Request struct { *velerov1api.Backup StorageLocation *velerov1api.BackupStorageLocation SnapshotLocations []*velerov1api.VolumeSnapshotLocation NamespaceIncludesExcludes *collections.IncludesExcludes ResourceIncludesExcludes collections.IncludesExcludesInterface ResourceHooks []hook.ResourceHook ResolvedActions []framework.BackupItemResolvedActionV2 ResolvedItemBlockActions []framework.ItemBlockResolvedAction VolumeSnapshots []*volume.Snapshot PodVolumeBackups []*velerov1api.PodVolumeBackup BackedUpItems map[itemKey]struct{} ResPolicies *resourcepolicies.Policies SkippedPVTracker *skipPVTracker VolumesInformation volume.BackupVolumesInformation // contains filtered or unexported fields }
Request is a request for a backup, with all references to other objects materialized (e.g. backup/snapshot locations, includes/excludes, etc.)
func (*Request) BackupResourceList ¶ added in v1.0.1
BackupResourceList returns the list of backed up resources grouped by the API Version and Kind
func (*Request) FillVolumesInformation ¶ added in v1.13.0
func (r *Request) FillVolumesInformation()
func (*Request) GetItemOperationsList ¶ added in v1.11.0
func (r *Request) GetItemOperationsList() *[]*itemoperation.BackupOperation
GetItemOperationsList returns ItemOperationsList, initializing it if necessary
type SkippedPV ¶ added in v1.12.0
type SkippedPV struct { Name string `json:"name"` Reasons []PVSkipReason `json:"reasons"` }
func (*SkippedPV) SerializeSkipReasons ¶ added in v1.13.0
type VolumeSnapshotterGetter ¶ added in v1.0.0
type VolumeSnapshotterGetter interface {
GetVolumeSnapshotter(name string) (vsv1.VolumeSnapshotter, error)
}