backupstorage

package
v0.3.10-0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

View Source
const (
	PackageDiskFilename     = "disk"
	PackageMetadataFilename = "metadata"
)

Variables

View Source
var ErrorBackupStorageOffline error = errors.Error(api.BackupStorageOffline)

Functions

This section is empty.

Types

type IBackupStorage

type IBackupStorage interface {
	CopyBackupFrom(srcFilename string, bakcupId string) error
	CopyBackupTo(targetFilename string, backupId string) error
	RemoveBackup(backupId string) error
	IsExists(backupId string) (bool, error)
	ConvertTo(destPath string, format qemuimg.TImageFormat, backupId string) error
	ConvertFrom(srcPath string, format qemuimg.TImageFormat, backupId string) (int, error)
	InstancePack(ctx context.Context, packageName string, backupIds []string, metadata *api.InstanceBackupPackMetadata) (string, error)
	InstanceUnpack(ctx context.Context, packageName string, metadataOnly bool) ([]string, *api.InstanceBackupPackMetadata, error)
	IsOnline() (bool, string, error)
}

func GetBackupStorage

func GetBackupStorage(backupStroageId string, backupStorageAccessInfo *jsonutils.JSONDict) (IBackupStorage, error)

func NewBackupStorage

func NewBackupStorage(backupStroageId string, backupStorageAccessInfo *jsonutils.JSONDict) (IBackupStorage, error)

type SNFSBackupStorage

type SNFSBackupStorage struct {
	BackupStorageId string
	Path            string
	NfsHost         string
	NfsSharedDir    string
	// contains filtered or unexported fields
}

func NewNFSBackupStorage

func NewNFSBackupStorage(backupStorageId, nfsHost, nfsSharedDir string) *SNFSBackupStorage

func (*SNFSBackupStorage) ConvertFrom

func (s *SNFSBackupStorage) ConvertFrom(srcPath string, format qemuimg.TImageFormat, backupId string) (int, error)

func (*SNFSBackupStorage) ConvertTo

func (s *SNFSBackupStorage) ConvertTo(destPath string, format qemuimg.TImageFormat, backupId string) error

func (*SNFSBackupStorage) CopyBackupFrom

func (s *SNFSBackupStorage) CopyBackupFrom(srcFilename string, backupId string) error

func (*SNFSBackupStorage) CopyBackupTo

func (s *SNFSBackupStorage) CopyBackupTo(targetFilename string, backupId string) error

func (*SNFSBackupStorage) GetBackupPath

func (s *SNFSBackupStorage) GetBackupPath(backupId string) string

func (*SNFSBackupStorage) InstancePack

func (s *SNFSBackupStorage) InstancePack(ctx context.Context, packageName string, backupIds []string, metadata *api.InstanceBackupPackMetadata) (string, error)

func (*SNFSBackupStorage) InstanceUnpack

func (s *SNFSBackupStorage) InstanceUnpack(ctx context.Context, packageName string, metadataOnly bool) ([]string, *api.InstanceBackupPackMetadata, error)

func (*SNFSBackupStorage) IsExists

func (s *SNFSBackupStorage) IsExists(backupId string) (bool, error)

func (*SNFSBackupStorage) IsOnline

func (s *SNFSBackupStorage) IsOnline() (bool, string, error)

func (*SNFSBackupStorage) RemoveBackup

func (s *SNFSBackupStorage) RemoveBackup(backupId string) error

Jump to

Keyboard shortcuts

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