backupbackingimage

package
v0.0.0-...-b405e8f Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

View Source
const (
	BackingImageBlockSeparateLayer1 = 2
	BackingImageBlockSeparateLayer2 = 4

	BackingImageDirectory  = "backing-images"
	BackingImageConfigFile = "backing-image.cfg"

	BlocksDirectory = "blocks"
	BlkSuffix       = ".blk"
)
View Source
const (
	BackingImageLogType = "BackingImage"
)

Variables

This section is empty.

Functions

func CreateBackingImageBackup

func CreateBackingImageBackup(config *BackupConfig, backupBackingImage *BackupBackingImage, backupOperation BackupOperation, mappings *common.Mappings) (err error)

func DecodeBackupBackingImageURL

func DecodeBackupBackingImageURL(backupURL string) (string, string, error)

func EncodeBackupBackingImageURL

func EncodeBackupBackingImageURL(backingImageName, destURL string) string

func GetAllBackupBackingImageNames

func GetAllBackupBackingImageNames(driver backupstore.BackupStoreDriver) ([]string, error)

func RemoveBackingImageBackup

func RemoveBackingImageBackup(backupURL string) (err error)

func RestoreBackingImageBackup

func RestoreBackingImageBackup(config *RestoreConfig, restoreOperation RestoreOperation) error

Types

type BackupBackingImage

type BackupBackingImage struct {
	sync.Mutex

	Name              string
	Size              int64 `json:",string"`
	BlockCount        int64 `json:",string"`
	Checksum          string
	Labels            map[string]string
	CompressionMethod string
	CreatedTime       string
	CompleteTime      string
	Secret            string
	SecretNamespace   string

	ProcessingBlocks *common.ProcessingBlocks

	Blocks []common.BlockMapping `json:",omitempty"`
}

type BackupConfig

type BackupConfig struct {
	Name            string
	DestURL         string
	ConcurrentLimit int32
	Parameters      map[string]string
}

type BackupInfo

type BackupInfo struct {
	Name              string
	URL               string
	CompleteAt        string
	Size              int64 `json:",string"`
	Checksum          string
	Labels            map[string]string
	CompressionMethod string `json:",omitempty"`
	Secret            string
	SecretNamespace   string
}

func InspectBackupBackingImage

func InspectBackupBackingImage(backupURL string) (*BackupInfo, error)

type BackupOperation

type BackupOperation interface {
	ReadFile(start int64, data []byte) error
	CloseFile()
	UpdateBackupProgress(state string, progress int, backupURL string, err string)
}

type RestoreConfig

type RestoreConfig struct {
	BackupURL       string
	Filename        string
	ConcurrentLimit int32
}

type RestoreOperation

type RestoreOperation interface {
	UpdateRestoreProgress(progress int, err error)
}

Jump to

Keyboard shortcuts

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