Documentation
¶
Index ¶
Constants ¶
View Source
const EntryTimeFormat = time.RFC3339
Variables ¶
This section is empty.
Functions ¶
func CheckZfsCommand ¶
func CheckZfsCommand() error
Types ¶
type Config ¶
type Config struct {
Destination S3Config `` /* 366-byte string literal not displayed */
FullBackup FullBackupConfig `toml:"full_backup"`
CoreRestURL string `toml:"core_rest_url" comment:"Core REST URL where the /statistics endpoint is available"`
PoolName string `toml:"pool_name" comment:"Pool name to backup, We backup all inherited pools as well"`
StateFilePath string `toml:"state_file" comment:"Path where the state is saved"`
ZfsBackupBinaryPath string `toml:"zfsbackup_binary" comment:"Path for the binary https://github.com/someone1/zfsbackup-go"`
}
func DefaultConfig ¶
func DefaultConfig() Config
func LoadConfig ¶
type FullBackupConfig ¶
type FullBackupConfig struct {
WhenEmptyState bool `toml:"when_empty_state" comment:"Full backup is enforced when there is no prevous backups in the state file"`
EveryNBackups int `toml:"every_n_backups" comment:"Defines how ofter(every N backups) full backup must be created"`
EveryTimeDuration time.Duration `toml:"every_time_duration" comment:"Define how often(in term of times) full backup must be created"`
}
type Pool ¶
func ListZfsPools ¶
type S3Config ¶
type S3Config struct {
Endpoint string `toml:"endpoint" comment:"The S3 endpoint"`
Region string `toml:"region" comment:"The S3 region"`
Bucket string `toml:"bucket" comment:"The S3 bucket name where backup is located"`
Path string `toml:"path" comment:"The path on S3 where the backup is located. It is composed with bucket name into s3://<bucket>/<path>"`
AccessKeyIdEnvName string `toml:"access_key_id_env_name" comment:"Environment variable name used to source access key id for the S3 API"`
AccessKeySecretEnvName string `toml:"access_key_secret_env_name" comment:"Environment variable name used to source access key secret for the S3 API"`
}
type State ¶
func LoadStateFromFile ¶
func OpenOrCreateNewState ¶
func (State) SortedBackups ¶
Click to show internal directories.
Click to hide internal directories.