Documentation
¶
Index ¶
- Constants
- func CreateDeltaBlockBackup(volume *Volume, snapshot *Snapshot, destURL string, ...) (string, error)
- func CreateSingleFileBackup(volume *Volume, snapshot *Snapshot, filePath, destURL string) (string, error)
- func DeleteDeltaBlockBackup(backupURL string) error
- func DeleteSingleFileBackup(backupURL string) error
- func GetBackupInfo(backupURL string) (map[string]string, error)
- func List(volumeUUID, destURL, storageDriverName string) (map[string]map[string]string, error)
- func RegisterDriver(kind string, initFunc InitFunc) error
- func RestoreDeltaBlockBackup(backupURL, volDevName string) error
- func RestoreSingleFileBackup(backupURL, path string) (string, error)
- type Backup
- type BackupFile
- type BlockMapping
- type DeltaBlockBackupOperations
- type InitFunc
- type ObjectStoreDriver
- type Snapshot
- type Volume
Constants ¶
View Source
const ( OBJECTSTORE_BASE = "convoy-objectstore" VOLUME_SEPARATE_LAYER1 = 2 VOLUME_SEPARATE_LAYER2 = 4 VOLUME_DIRECTORY = "volumes" VOLUME_CONFIG_FILE = "volume.cfg" BACKUP_DIRECTORY = "backups" BACKUP_CONFIG_PREFIX = "backup_" CFG_SUFFIX = ".cfg" )
View Source
const ( DEFAULT_BLOCK_SIZE = 2097152 BLOCKS_DIRECTORY = "blocks" BLOCK_SEPARATE_LAYER1 = 2 BLOCK_SEPARATE_LAYER2 = 4 )
View Source
const (
BACKUP_FILES_DIRECTORY = "BackupFiles"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDeltaBlockBackup ¶
func CreateDeltaBlockBackup(volume *Volume, snapshot *Snapshot, destURL string, sDriver convoydriver.ConvoyDriver) (string, error)
func CreateSingleFileBackup ¶
func DeleteDeltaBlockBackup ¶
func DeleteSingleFileBackup ¶
func RegisterDriver ¶
func RestoreDeltaBlockBackup ¶
func RestoreSingleFileBackup ¶
Types ¶
type Backup ¶
type Backup struct {
UUID string
Driver string
VolumeUUID string
SnapshotUUID string
SnapshotName string
SnapshotCreatedAt string
CreatedTime string
Blocks []BlockMapping `json:",omitempty"`
SingleFile BackupFile `json:",omitempty"`
}
type BackupFile ¶
type BackupFile struct {
FilePath string
}
type BlockMapping ¶
type DeltaBlockBackupOperations ¶
type DeltaBlockBackupOperations interface {
GetVolumeDevice(id string) (string, error)
HasSnapshot(id, volumeID string) bool
CompareSnapshot(id, compareID, volumeID string) (*metadata.Mappings, error)
OpenSnapshot(id, volumeID string) error
ReadSnapshot(id, volumeID string, start int64, data []byte) error
CloseSnapshot(id, volumeID string) error
}
type InitFunc ¶
type InitFunc func(destURL string) (ObjectStoreDriver, error)
type ObjectStoreDriver ¶
type ObjectStoreDriver interface {
Kind() string
GetURL() string
FileExists(filePath string) bool
FileSize(filePath string) int64
Remove(names ...string) error // Bahavior like "rm -rf"
Read(src string) (io.ReadCloser, error) // Caller needs to close
Write(dst string, rs io.ReadSeeker) error
List(path string) ([]string, error) // Behavior like "ls", not like "find"
Upload(src, dst string) error
Download(src, dst string) error
}
func GetObjectStoreDriver ¶
func GetObjectStoreDriver(destURL string) (ObjectStoreDriver, error)
Click to show internal directories.
Click to hide internal directories.