Documentation
¶
Index ¶
- Constants
- func CreateDeltaBlockBackup(config *DeltaBackupConfig) (string, error)
- func CreateSingleFileBackup(volume *Volume, snapshot *Snapshot, filePath, destURL string) (string, error)
- func DeleteDeltaBlockBackup(backupURL string) error
- func DeleteSingleFileBackup(backupURL string) error
- func GetBackupstoreBase() string
- func List(volumeName, destURL string, volumeOnly bool) (map[string]*VolumeInfo, error)
- func RegisterDriver(kind string, initFunc InitFunc) error
- func RestoreDeltaBlockBackup(backupURL, volDevName string) error
- func RestoreSingleFileBackup(backupURL, path string) (string, error)
- func SetBackupstoreBase(base string)
- type Backup
- type BackupFile
- type BackupInfo
- type BackupStoreDriver
- type BlockMapping
- type DeltaBackupConfig
- type DeltaBlockBackupOperations
- type InitFunc
- type Mapping
- type Mappings
- type Snapshot
- type Volume
- type VolumeInfo
Constants ¶
View Source
const ( 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(config *DeltaBackupConfig) (string, error)
func CreateSingleFileBackup ¶
func DeleteDeltaBlockBackup ¶
func DeleteSingleFileBackup ¶
func GetBackupstoreBase ¶
func GetBackupstoreBase() string
func RegisterDriver ¶
func RestoreDeltaBlockBackup ¶
func RestoreSingleFileBackup ¶
func SetBackupstoreBase ¶
func SetBackupstoreBase(base string)
Types ¶
type Backup ¶
type Backup struct { Name string VolumeName string SnapshotName string SnapshotCreatedAt string CreatedTime string Size int64 `json:",string"` Labels map[string]string Blocks []BlockMapping `json:",omitempty"` SingleFile BackupFile `json:",omitempty"` }
type BackupFile ¶
type BackupFile struct {
FilePath string
}
type BackupInfo ¶
type BackupInfo struct { Name string URL string SnapshotName string SnapshotCreated string Created string Size int64 `json:",string"` Labels map[string]string VolumeName string `json:",omitempty"` VolumeSize int64 `json:",string,omitempty"` VolumeCreated string `json:",omitempty"` }
func InspectBackup ¶
func InspectBackup(backupURL string) (*BackupInfo, error)
type BackupStoreDriver ¶
type BackupStoreDriver 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 GetBackupStoreDriver ¶
func GetBackupStoreDriver(destURL string) (BackupStoreDriver, error)
type BlockMapping ¶
type DeltaBackupConfig ¶
type InitFunc ¶
type InitFunc func(destURL string) (BackupStoreDriver, error)
type Volume ¶
type Volume struct { Name string Size int64 `json:",string"` CreatedTime string LastBackupName string BlockCount int64 `json:",string"` }
func LoadVolume ¶
type VolumeInfo ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.