Documentation ¶
Index ¶
- func Contains(slice []string, element string) bool
- type Backup
- type BackupAge
- type BackupHandler
- type Check
- type Config
- type Defaults
- type Policy
- type Repository
- type RepositoryHandler
- type Restic
- func (r Restic) CheckAge(backup Backup, repository Repository) (bool, bool, error)
- func (r Restic) GetLastBackupTimestamp(backup Backup, repository Repository) (time.Time, error)
- func (r Restic) Init(repository Repository) error
- func (r Restic) IsRepositoryAvailable(repository Repository) error
- func (r Restic) IsResticAvailable() bool
- func (r Restic) Mount(repository Repository, mountPoint string) error
- func (r Restic) PrepareResticEnvironmentCommand(command string, repoURL string, password string, environment map[string]string, ...) *exec.Cmd
- func (r Restic) PrintSnapshots(repository Repository) error
- func (r Restic) RunBackup(backup Backup, repository Repository) error
- func (r Restic) RunCheck(repository Repository) error
- func (r Restic) RunForget(repository Repository) error
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backup ¶
type Backup struct { Name string `json:"name,omitempty"` Repositories []string `json:"repositories,omitempty"` Data []string `json:"data,omitempty"` DataStdinCommand string `json:"data_stdin_command,omitempty"` StdinFilename string `json:"stdin_filename,omitempty"` Exclude []string `json:"exclude,omitempty"` OneFileSystem bool `json:"one_file_system,omitempty"` Tags []string `json:"tags,omitempty"` Environment map[string]string `json:"environment,omitempty"` CustomFlags []string `json:"custom_flags,omitempty"` // contains filtered or unexported fields }
type BackupHandler ¶
type Config ¶
type Config struct { ResticExecutable string `json:"restic_executable,omitempty"` Defaults Defaults `json:"defaults,omitempty"` Repositories []Repository `json:"repositories,omitempty"` Backups []Backup `json:"backups,omitempty"` }
func (*Config) GetBackupByName ¶
func (*Config) GetRepositoryByName ¶
func (c *Config) GetRepositoryByName(name string) *Repository
type Defaults ¶
type Defaults struct { Repositories repositoryDefaultable `json:"repositories,omitempty"` Backups backupDefaultable `json:"backups,omitempty"` }
type Policy ¶
type Policy struct { KeepLast uint `json:"keep_last,omitempty"` KeepHourly uint `json:"keep_hourly,omitempty"` KeepDaily uint `json:"keep_daily,omitempty"` KeepWeekly uint `json:"keep_weekly,omitempty"` KeepMonthly uint `json:"keep_monthly,omitempty"` KeepYearly uint `json:"keep_yearly,omitempty"` KeepWithin string `json:"keep_within,omitempty"` KeepTags []string `json:"keep_tags,omitempty"` }
type Repository ¶
type Repository struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Password string `json:"password,omitempty"` Environment map[string]string `json:"environment,omitempty"` Check Check `json:"check,omitempty"` CustomFlags []string `json:"custom_flags,omitempty"` // contains filtered or unexported fields }
type RepositoryHandler ¶
type Restic ¶
type Restic struct {
// contains filtered or unexported fields
}
func (Restic) GetLastBackupTimestamp ¶
func (Restic) Init ¶
func (r Restic) Init(repository Repository) error
func (Restic) IsRepositoryAvailable ¶
func (r Restic) IsRepositoryAvailable(repository Repository) error
func (Restic) IsResticAvailable ¶
func (Restic) PrepareResticEnvironmentCommand ¶
func (Restic) PrintSnapshots ¶
func (r Restic) PrintSnapshots(repository Repository) error
func (Restic) RunCheck ¶
func (r Restic) RunCheck(repository Repository) error
func (Restic) RunForget ¶
func (r Restic) RunForget(repository Repository) error
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.