Documentation ¶
Overview ¶
Package filebackupstorage implements the BackupStorage interface for a local filesystem (which can be an NFS mount).
Index ¶
- Variables
- type FileBackupHandle
- func (fbh *FileBackupHandle) AbortBackup() error
- func (fbh *FileBackupHandle) AddFile(filename string) (io.WriteCloser, error)
- func (fbh *FileBackupHandle) Directory() string
- func (fbh *FileBackupHandle) EndBackup() error
- func (fbh *FileBackupHandle) Name() string
- func (fbh *FileBackupHandle) ReadFile(filename string) (io.ReadCloser, error)
- type FileBackupStorage
Constants ¶
This section is empty.
Variables ¶
var ( // FileBackupStorageRoot is where the backups will go. // Exported for test purposes. FileBackupStorageRoot = flag.String("file_backup_storage_root", "", "root directory for the file backup storage") )
Functions ¶
This section is empty.
Types ¶
type FileBackupHandle ¶
type FileBackupHandle struct {
// contains filtered or unexported fields
}
FileBackupHandle implements BackupHandle for local file system.
func (*FileBackupHandle) AbortBackup ¶
func (fbh *FileBackupHandle) AbortBackup() error
AbortBackup is part of the BackupHandle interface
func (*FileBackupHandle) AddFile ¶
func (fbh *FileBackupHandle) AddFile(filename string) (io.WriteCloser, error)
AddFile is part of the BackupHandle interface
func (*FileBackupHandle) Directory ¶
func (fbh *FileBackupHandle) Directory() string
Directory is part of the BackupHandle interface
func (*FileBackupHandle) EndBackup ¶
func (fbh *FileBackupHandle) EndBackup() error
EndBackup is part of the BackupHandle interface
func (*FileBackupHandle) Name ¶
func (fbh *FileBackupHandle) Name() string
Name is part of the BackupHandle interface
func (*FileBackupHandle) ReadFile ¶
func (fbh *FileBackupHandle) ReadFile(filename string) (io.ReadCloser, error)
ReadFile is part of the BackupHandle interface
type FileBackupStorage ¶
type FileBackupStorage struct{}
FileBackupStorage implements BackupStorage for local file system.
func (*FileBackupStorage) Close ¶
func (fbs *FileBackupStorage) Close() error
Close implements BackupStorage.
func (*FileBackupStorage) ListBackups ¶
func (fbs *FileBackupStorage) ListBackups(dir string) ([]backupstorage.BackupHandle, error)
ListBackups is part of the BackupStorage interface
func (*FileBackupStorage) RemoveBackup ¶
func (fbs *FileBackupStorage) RemoveBackup(dir, name string) error
RemoveBackup is part of the BackupStorage interface
func (*FileBackupStorage) StartBackup ¶
func (fbs *FileBackupStorage) StartBackup(dir, name string) (backupstorage.BackupHandle, error)
StartBackup is part of the BackupStorage interface