restore

Section profile.restore

This section configures restic command restore . Information on command and flags is copied from the restic manual pages.

The “restore” command extracts the data from a snapshot from the repository to a directory.

The special snapshotID “latest” can be used to restore the latest snapshot in the repository.

To only restore a specific subfolder, you can use the “snapshotID:subfolder” syntax, where “subfolder” is a path within the snapshot.

Flags used by resticprofile only:
NameTypeDefaultNotes
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
Flags passed to the restic command line:
NameTypeDefaultNotes
deletetrue / falsefalsedelete files from target directory if they do not exist in snapshot. Use ‘–dry-run -vv’ to check what would be deleted. restic >= 0.17.0
dry-runtrue / falsefalsedo not write any data, just show what would be done. restic >= 0.17.0
excludeone or more stringsexclude a pattern
exclude-fileone or more stringsread exclude patterns from a file. restic >= 0.17.0
hosttrue / false OR one or more hostnamesonly consider snapshots for this host, when snapshot ID “latest” is given (can be specified multiple times) (default: $RESTIC_HOST). Boolean true is replaced with the hostname of the system. Examples: true, false, "host"
iexcludeone or more stringssame as –exclude pattern but ignores the casing of filenames. restic >= 0.10.0
iexclude-fileone or more stringssame as –exclude-file but ignores casing of filenames in patterns. restic >= 0.17.0
iincludeone or more stringssame as –include pattern but ignores the casing of filenames. restic >= 0.10.0
iinclude-fileone or more stringssame as –include-file but ignores casing of filenames in patterns. restic >= 0.17.0
includeone or more stringsinclude a pattern
include-fileone or more stringsread include patterns from a file. restic >= 0.17.0
overwritestringalwaysoverwrite behavior, one of (always/if-changed/if-newer/never) (default: always). restic >= 0.17.0
pathtrue / false OR one or more stringsonly consider snapshots including this (absolute) path, when snapshot ID “latest” is given (can be specified multiple times, snapshots must include all specified paths). Boolean true is replaced with the paths from section “backup”. Examples: true, false, "path"
sparsetrue / falsefalserestore files as sparse. restic >= 0.15.0
tagtrue / false OR one or more stringsonly consider snapshots including tag[,tag,…], when snapshot ID “latest” is given. Boolean true is replaced with the tags from section “backup”. Examples: true, false, "tag"
targetstring""directory to extract data to
verifytrue / falsefalseverify restored files content

Flags declared for the restic command line in section profile can be overridden in this section.