constants

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandBackup    = "backup"
	CommandCheck     = "check"
	CommandForget    = "forget"
	CommandInit      = "init"
	CommandPrune     = "prune"
	CommandSnapshots = "snapshots"
	CommandUnlock    = "unlock"
	CommandMount     = "mount"
	CommandCopy      = "copy"
	CommandDump      = "dump"
	CommandFind      = "find"
	CommandLs        = "ls"
	CommandRestore   = "restore"
	CommandStats     = "stats"
	CommandTag       = "tag"
)

Restic commands

View Source
const (
	DefaultConfigurationFile    = "profiles"
	DefaultProfileName          = "default"
	DefaultCommand              = "snapshots"
	DefaultResticLockRetryAfter = 60 * time.Second
	DefaultResticStaleLockAge   = 2 * time.Hour
	DefaultTheme                = "light"
	DefaultIONiceFlag           = false
	DefaultStandardNiceFlag     = 0
	DefaultBackgroundNiceFlag   = 5
	DefaultVerboseFlag          = false
	DefaultQuietFlag            = false
	DefaultMinMemory            = 100
	DefaultSenderTimeout        = 30 * time.Second
)

Configuration defaults

View Source
const (
	EnvProfileName      = "PROFILE_NAME"
	EnvProfileCommand   = "PROFILE_COMMAND"
	EnvError            = "ERROR"
	EnvErrorMessage     = "ERROR_MESSAGE"
	EnvErrorCommandLine = "ERROR_COMMANDLINE"
	EnvErrorExitCode    = "ERROR_EXIT_CODE"
	EnvErrorStderr      = "ERROR_STDERR"
)
View Source
const (
	FlagAsChild = "as-child"
	FlagPort    = "parent-port"
)

resticprofile flag

View Source
const (
	SchedulerLaunchd = "launchd"
	SchedulerWindows = "taskscheduler"
	SchedulerSystemd = "systemd"
	SchedulerCrond   = "crond"
)

Scheduler type

View Source
const (
	MinResticLockRetryTime = 15 * time.Second
	MaxResticLockRetryTime = 30 * time.Minute
	MinResticStaleLockAge  = 1 * time.Hour
)

Limits for restic lock handling (stale locks and retry on lock failure)

View Source
const (
	ScheduleLockModeOptionFail   = "fail"
	ScheduleLockModeOptionIgnore = "ignore"
)

Schedule lock mode config options

View Source
const (
	ExitCodeSuccess = 0
	ExitCodeError   = 1
	ExitCodeWarning = 3
)
View Source
const (
	ParameterIONice            = "ionice"
	ParameterIONiceClass       = "ionice-class"
	ParameterIONiceLevel       = "ionice-level"
	ParameterNice              = "nice"
	ParameterPriority          = "priority"
	ParameterDefaultCommand    = "default-command"
	ParameterInitialize        = "initialize"
	ParameterResticBinary      = "restic-binary"
	ParameterInherit           = "inherit"
	ParameterHost              = "host"
	ParameterPath              = "path"
	ParameterTag               = "tag"
	ParameterDescription       = "description"
	ParameterVersion           = "version"
	ParameterCopyChunkerParams = "copy-chunker-params"
)

Parameter

View Source
const (
	SectionConfigurationDescription = "description"
	SectionConfigurationGlobal      = "global"
	SectionConfigurationRetention   = "retention"
	SectionConfigurationEnvironment = "env"
	SectionConfigurationGroups      = "groups"
	SectionConfigurationIncludes    = "includes"
	SectionConfigurationInherit     = "inherit"
	SectionConfigurationProfiles    = "profiles"
	SectionConfigurationSchedules   = "schedules"
	SectionConfigurationMixins      = "mixins"
	SectionConfigurationMixinUse    = "use"

	SectionDefinitionCommon = "common"
	SectionDefinitionForget = "forget"
)

Section

View Source
const (
	SchedulePermissionUser     = "user"
	SchedulePermissionSystem   = "system"
	SchedulePriorityBackground = "background"
	SchedulePriorityStandard   = "standard"
)

Parameter values

View Source
const (
	ApplicationName = "resticprofile"
)

Variables

View Source
var (
	// PriorityValues is the map between the name and the value
	PriorityValues = map[string]int{
		"idle":       priority.Idle,
		"background": priority.Background,
		"low":        priority.Low,
		"normal":     priority.Normal,
		"high":       priority.High,
		"highest":    priority.Highest,
	}
)
View Source
var (
	SwappableParameters = []string{
		"repo",
		"repository-file",
		"password-file",
		"password-command",
		"key-hint",
	}
)

Parameter that has a "2" after its name when needing 2 repositories (init and copy only)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL