Documentation ¶
Index ¶
- Constants
- Variables
- type IBackupStorage
- type SNFSBackupStorage
- func (s *SNFSBackupStorage) ConvertFrom(srcPath string, format qemuimg.TImageFormat, backupId string) (int, error)
- func (s *SNFSBackupStorage) ConvertTo(destPath string, format qemuimg.TImageFormat, backupId string) error
- func (s *SNFSBackupStorage) CopyBackupFrom(srcFilename string, backupId string) error
- func (s *SNFSBackupStorage) CopyBackupTo(targetFilename string, backupId string) error
- func (s *SNFSBackupStorage) GetBackupPath(backupId string) string
- func (s *SNFSBackupStorage) InstancePack(ctx context.Context, packageName string, backupIds []string, ...) (string, error)
- func (s *SNFSBackupStorage) InstanceUnpack(ctx context.Context, packageName string, metadataOnly bool) ([]string, *api.InstanceBackupPackMetadata, error)
- func (s *SNFSBackupStorage) IsExists(backupId string) (bool, error)
- func (s *SNFSBackupStorage) IsOnline() (bool, string, error)
- func (s *SNFSBackupStorage) RemoveBackup(backupId string) error
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 // 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) RemoveBackup ¶
func (s *SNFSBackupStorage) RemoveBackup(backupId string) error
Click to show internal directories.
Click to hide internal directories.