Section Profile

Profile sections

In config file format v1, the name of this section is the name of your profile (excluding reserved names like global, groups, includes & version).

From config file format v2, profile sections are declared as named configuration structure below section profiles (see Configuration v2 for details).

Section profile

Flags used by resticprofile only:
NameTypeDefaultNotes
base-dirstringSets the working directory for this profile. The profile will fail when the working directory cannot be changed. Leave empty to use the current directory instead
descriptionstringDescribes the profile
envkey => valueAdditional environment variables to set in any child process. Inline env variables take precedence over dotenv files declared with “env-file”
env-fileone or more stringsAdditional dotenv files to load and set as environment in any child process
force-inactive-locktrue / falsefalseAllows to lock when the existing lock is considered stale
inheritstringName of the profile to inherit all of the settings from
initializetrue / falseInitialize the restic repository if missing
lockstringPath to the lock file to use with resticprofile locks
prometheus-labelskey => stringAdditional prometheus labels to set
prometheus-pushuriURL of the prometheus push gateway to send the summary of the last restic command result to
prometheus-push-formatstringtextPrometheus push gateway request format. Is one of text, protobuf
prometheus-push-jobstringPrometheus push gateway job name. $command placeholder is replaced with restic command
prometheus-save-to-filestringPath to the prometheus metrics file to update with a summary of the last restic command result
run-afterone or more stringsRun shell command(s) after a successful restic command
run-after-failone or more stringsRun shell command(s) after failed restic or shell commands
run-beforeone or more stringsRun shell command(s) before a restic command
run-finallyone or more stringsRun shell command(s) always, after all other commands
status-filestringPath to the status file to update with a summary of last restic command result
stream-errorone or more nested StreamErrorSectionRun shell command(s) when a pattern matches the stderr of restic
systemd-drop-in-filesone or more stringsFiles containing systemd drop-in (override) files - see schedules/systemd/
Flags passed to the restic command line:
NameTypeDefaultNotes
cacertstringfile to load root certificates from (default: use system certificates or $RESTIC_CACERT)
cache-dirstring""set the cache directory. (default: use system default cache directory)
cleanup-cachetrue / falsefalseauto remove old cache directories
compressionstringautocompression mode (only available for repository format version 2), one of (auto/off/max) (default: $RESTIC_COMPRESSION). restic >= 0.14.0
extended-statustrue / falsefalseset output mode to JSON for commands that support it
http-user-agentstring""set a http user agent for outgoing http requests. restic >= 0.17.0
insecure-no-passwordtrue / falsefalseuse an empty password for the repository, must be passed to every restic command (insecure). restic >= 0.17.0
insecure-tlstrue / falsefalseskip TLS certificate verification when connecting to the repository (insecure). restic >= 0.13.0
key-hintstring""key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
limit-downloadinteger0limits downloads to a maximum rate in KiB/s. (default: unlimited)
limit-uploadinteger0limits uploads to a maximum rate in KiB/s. (default: unlimited)
no-cachetrue / falsefalsedo not use a local cache
no-extra-verifytrue / falsefalseskip additional verification of data before upload (see documentation). restic >= 0.16.4
no-locktrue / falsefalsedo not lock the repository, this allows some operations on read-only repositories
optionone or more stringsset extended option (key=value)
pack-sizeinteger0set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE). restic >= 0.14.0
password-commandstring""shell command to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)
password-filestring""file to read the repository password from (default: $RESTIC_PASSWORD_FILE)
quiettrue / falsefalsedo not output comprehensive progress report
repositorystring""repository to backup to or restore from (default: $RESTIC_REPOSITORY)
repository-filestring""file to read the repository location from (default: $RESTIC_REPOSITORY_FILE). restic >= 0.11.0
retry-lockstring0sretry to lock the repository if it is already locked, takes a value like 5m or 2h (default: no retries). restic >= 0.16.0
tls-client-certstring""path to a file containing PEM encoded TLS client certificate and private key (default: $RESTIC_TLS_CLIENT_CERT)
verbosetrue / false OR integer0be verbose (true for level 1 or a number for increased verbosity, max level is 2)
Note

Most restic command flags defined in profile sections below can also be set at profile level. They will be inherited in all sections that define these flags and ignored in all others.