Versions in this module Expand all Collapse all v1 v1.0.2 Jul 10, 2023 v1.0.1 Jul 10, 2023 Changes in this version + const BACKUP_CONFIG_PREFIX + const BACKUP_DIRECTORY + const BACKUP_FILES_DIRECTORY + const BLK_SUFFIX + const BLOCKS_DIRECTORY + const BLOCK_SEPARATE_LAYER1 + const BLOCK_SEPARATE_LAYER2 + const CFG_SUFFIX + const DEFAULT_BLOCK_SIZE + const LEGACY_COMPRESSION_METHOD + const LOCKS_DIRECTORY + const LOCK_CHECK_WAIT_TIME + const LOCK_DURATION + const LOCK_PREFIX + const LOCK_REFRESH_INTERVAL + const LOCK_SUFFIX + const MessageTypeError + const PROGRESS_PERCENTAGE_BACKUP_SNAPSHOT + const PROGRESS_PERCENTAGE_BACKUP_TOTAL + const ProgressStateComplete + const ProgressStateError + const ProgressStateInProgress + const VOLUME_CONFIG_FILE + const VOLUME_DIRECTORY + const VOLUME_SEPARATE_LAYER1 + const VOLUME_SEPARATE_LAYER2 + func CleanUpAllMounts() (err error) + func CreateDeltaBlockBackup(backupName string, config *DeltaBackupConfig) (isIncremental bool, err error) + func CreateSingleFileBackup(volume *Volume, snapshot *Snapshot, filePath, destURL string) (string, error) + func DecodeBackupURL(backupURL string) (string, string, string, error) + func DeleteBackupVolume(volumeName string, destURL string) error + func DeleteDeltaBlockBackup(backupURL string) error + func DeleteSingleFileBackup(backupURL string) error + func EncodeBackupURL(backupName, volumeName, destURL string) string + func GetBackupstoreBase() string + func GetLog() logrus.FieldLogger + func List(volumeName, destURL string, volumeOnly bool) (map[string]*VolumeInfo, error) + func LoadConfigInBackupStore(driver BackupStoreDriver, filePath string, v interface{}) error + func RegisterDriver(kind string, initFunc InitFunc) error + func RestoreDeltaBlockBackup(config *DeltaRestoreConfig) error + func RestoreDeltaBlockBackupIncrementally(config *DeltaRestoreConfig) error + func RestoreSingleFileBackup(backupURL, path string) (string, error) + func SaveBackupStoreToLocalFile(driver BackupStoreDriver, backupStoreFileURL, localFilePath string) error + func SaveConfigInBackupStore(driver BackupStoreDriver, filePath string, v interface{}) error + func SaveLocalFileToBackupStore(localFilePath, backupStoreFilePath string, driver BackupStoreDriver) error + func SetBackupstoreBase(base string) + type Backup struct + Blocks []BlockMapping + CompressionMethod string + CreatedTime string + IsIncremental bool + Labels map[string]string + Name string + ProcessingBlocks *ProcessingBlocks + SingleFile BackupFile + Size int64 + SnapshotCreatedAt string + SnapshotName string + VolumeName string + type BackupFile struct + FilePath string + type BackupInfo struct + CompressionMethod string + Created string + IsIncremental bool + Labels map[string]string + Messages map[MessageType]string + Name string + Size int64 + SnapshotCreated string + SnapshotName string + URL string + VolumeBackingImageName string + VolumeCreated string + VolumeName string + VolumeSize int64 + func InspectBackup(backupURL string) (*BackupInfo, error) + type BackupStoreDriver interface + Download func(src, dst string) error + FileExists func(filePath string) bool + FileSize func(filePath string) int64 + FileTime func(filePath string) time.Time + GetURL func() string + Kind func() string + List func(path string) ([]string, error) + Read func(src string) (io.ReadCloser, error) + Remove func(path string) error + Upload func(src, dst string) error + Write func(dst string, rs io.ReadSeeker) error + func GetBackupStoreDriver(destURL string) (BackupStoreDriver, error) + type Block struct + type BlockInfo struct + type BlockMapping struct + BlockChecksum string + Offset int64 + type ConfigMetadata struct + ModificationTime time.Time + func GetConfigMetadata(url string) (*ConfigMetadata, error) + type DeltaBackupConfig struct + BackupName string + ConcurrentLimit int32 + DeltaOps DeltaBlockBackupOperations + DestURL string + Labels map[string]string + Snapshot *Snapshot + Volume *Volume + type DeltaBlockBackupOperations interface + CloseSnapshot func(id, volumeID string) error + CompareSnapshot func(id, compareID, volumeID string) (*Mappings, error) + HasSnapshot func(id, volumeID string) bool + OpenSnapshot func(id, volumeID string) error + ReadSnapshot func(id, volumeID string, start int64, data []byte) error + UpdateBackupStatus func(id, volumeID string, backupState string, backupProgress int, backupURL string, ...) error + type DeltaRestoreConfig struct + BackupURL string + ConcurrentLimit int32 + DeltaOps DeltaRestoreOperations + Filename string + LastBackupName string + type DeltaRestoreOperations interface + UpdateRestoreStatus func(snapshot string, restoreProgress int, err error) + type FileLock struct + Acquired bool + Name string + Type LockType + func New(driver BackupStoreDriver, volumeName string, lockType LockType) (*FileLock, error) + func (lock *FileLock) Lock() error + func (lock *FileLock) String() string + func (lock *FileLock) Unlock() error + type InitFunc func(destURL string) (BackupStoreDriver, error) + type JobResult struct + type LockType int + const BACKUP_LOCK + const DELETION_LOCK + const RESTORE_LOCK + const UNTYPED_LOCK + type Mapping struct + Offset int64 + Size int64 + type Mappings struct + BlockSize int64 + Mappings []Mapping + type MessageType string + type ProcessingBlocks struct + type ProgressState string + type Snapshot struct + CreatedTime string + Name string + type Volume struct + BackingImageChecksum string + BackingImageName string + BlockCount int64 + CompressionMethod string + CreatedTime string + Labels map[string]string + LastBackupAt string + LastBackupName string + Name string + Size int64 + StorageClassName string + func LoadVolume(backupURL string) (*Volume, error) + type VolumeInfo struct + BackingImageChecksum string + BackingImageName string + Backups map[string]*BackupInfo + Created string + DataStored int64 + Labels map[string]string + LastBackupAt string + LastBackupName string + Messages map[MessageType]string + Name string + Size int64 + StorageClassname string + func InspectVolume(volumeURL string) (*VolumeInfo, error)