stats

Section profile.stats

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

The “stats” command walks one or multiple snapshots in a repository and accumulates statistics about the data stored therein. It reports on the number of unique files and their sizes, according to one of the counting modes as given by the –mode flag.

It operates on all snapshots matching the selection criteria or all snapshots if nothing is specified. The special snapshot ID “latest” is also supported. Some modes make more sense over just a single snapshot, while others are useful across all snapshots, depending on what you are trying to calculate.

The modes are:

  • restore-size: (default) Counts the size of the restored files.
  • files-by-contents: Counts total size of unique files, where a file is considered unique if it has unique contents.
  • raw-data: Counts the size of blobs in the repository, regardless of how many files reference them.
  • blobs-per-file: A combination of files-by-contents and raw-data.

Refer to the online manual for more details about each mode.

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
hosttrue / false OR one or more hostnamesonly consider snapshots for this host (can be specified multiple times) (default: $RESTIC_HOST). Boolean true is replaced with the hostname of the system. Examples: true, false, "host"
modestring"restore-size"counting mode: restore-size (default), files-by-contents, blobs-per-file or raw-data
pathtrue / false OR one or more stringsonly consider snapshots including this (absolute) path (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" . restic >= 0.10.0
tagtrue / false OR one or more stringsonly consider snapshots including tag[,tag,…]. Boolean true is replaced with the tags from section “backup”. Examples: true, false, "tag" . restic >= 0.10.0

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