Documentation ¶
Index ¶
- Variables
- func ResticCheck() error
- type Backup
- type BackupTypeConfig
- type Config
- func (c *Config) BackupNames() []string
- func (c *Config) CreateRepositoryStruct(bConf BackupTypeConfig) (ResticRepository, error)
- func (c *Config) CreateTestStruct(bConf BackupTypeConfig) (tests.ResticTest, error)
- func (c *Config) IsValidName(name string) bool
- func (c *Config) ReadBackup(name string) (Backup, error)
- type ConfigRepository
- type LocalBackupConfig
- type LocalBackupRepository
- type ResticRepository
- type S3BackupConfig
- type S3BackupRepository
- type SftpBackupConfig
- type SftpBackupRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConfigNotFound = errors.New("config file not found") ErrConfigBackupNameNotFound = errors.New("backup name in config not found") )
View Source
var (
ErrSshConfigNotFound = errors.New("user ssh config file not found")
)
Functions ¶
func ResticCheck ¶
func ResticCheck() error
ResticCheck checks if "restic" command is available in system path
Types ¶
type Backup ¶
type Backup struct { Name string `yaml:"name"` Type string `yaml:"type"` Config BackupTypeConfig `yaml:"config"` }
type BackupTypeConfig ¶
type Config ¶
type Config struct { Repository ConfigRepository `yaml:"repository"` Backups []Backup `yaml:"backups"` }
func (*Config) BackupNames ¶
func (*Config) CreateRepositoryStruct ¶
func (c *Config) CreateRepositoryStruct(bConf BackupTypeConfig) (ResticRepository, error)
func (*Config) CreateTestStruct ¶
func (c *Config) CreateTestStruct(bConf BackupTypeConfig) (tests.ResticTest, error)
func (*Config) IsValidName ¶
type ConfigRepository ¶
type ConfigRepository struct {
Password string `yaml:"password"`
}
type LocalBackupConfig ¶
type LocalBackupConfig struct { Sources []string `yaml:"sources"` Destination string `yaml:"destination"` Excludes []string `yaml:"excludes"` }
func (LocalBackupConfig) String ¶
func (c LocalBackupConfig) String() string
func (LocalBackupConfig) Validate ¶
func (c LocalBackupConfig) Validate() error
type LocalBackupRepository ¶
type LocalBackupRepository struct { Password string Destination string Sources []string Excludes []string }
func (LocalBackupRepository) Backup ¶
func (r LocalBackupRepository) Backup() error
func (LocalBackupRepository) Check ¶
func (r LocalBackupRepository) Check() error
func (LocalBackupRepository) Init ¶
func (r LocalBackupRepository) Init() ([]byte, error)
func (LocalBackupRepository) Snapshots ¶
func (r LocalBackupRepository) Snapshots() ([]byte, error)
type ResticRepository ¶
type S3BackupConfig ¶
type S3BackupConfig struct { AccessKeyId string `yaml:"accessKeyId"` SecretAccessKey string `yaml:"secretAccessKey"` Region string `yaml:"region"` Sources []string `yaml:"sources"` Destination string `yaml:"destination"` Excludes []string `yaml:"excludes"` }
func (S3BackupConfig) String ¶
func (c S3BackupConfig) String() string
func (S3BackupConfig) Validate ¶
func (c S3BackupConfig) Validate() error
type S3BackupRepository ¶
type S3BackupRepository struct { Password string Destination string Sources []string Excludes []string AccessKeyId string SecretAccessKey string }
func (S3BackupRepository) Backup ¶
func (r S3BackupRepository) Backup() error
func (S3BackupRepository) Check ¶
func (r S3BackupRepository) Check() error
func (S3BackupRepository) Init ¶
func (r S3BackupRepository) Init() ([]byte, error)
func (S3BackupRepository) Snapshots ¶
func (r S3BackupRepository) Snapshots() ([]byte, error)
type SftpBackupConfig ¶
type SftpBackupConfig struct { Host string `yaml:"host"` Sources []string `yaml:"sources"` Destination string `yaml:"destination"` Excludes []string `yaml:"excludes"` }
func (SftpBackupConfig) String ¶
func (c SftpBackupConfig) String() string
func (SftpBackupConfig) Validate ¶
func (c SftpBackupConfig) Validate() error
type SftpBackupRepository ¶
type SftpBackupRepository struct { Password string Destination string Sources []string Excludes []string ConfigHost string }
func (SftpBackupRepository) Backup ¶
func (r SftpBackupRepository) Backup() error
func (SftpBackupRepository) Check ¶
func (r SftpBackupRepository) Check() error
func (SftpBackupRepository) Init ¶
func (r SftpBackupRepository) Init() ([]byte, error)
func (SftpBackupRepository) Snapshots ¶
func (r SftpBackupRepository) Snapshots() ([]byte, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.