RESTIC-STATS(1)

✨ restic-stats(1) β€” the "so how big is my repo actually" girlies ✨

okay bestie, this one lives in the restic backup(1) manual family, and it's the page that tells you how to count your stuff. no cap. πŸŽ€


🌸 NAME 🌸

restic-stats β€” scan the repository and show basic statistics πŸ‘‘


πŸ’… SYNOPSIS πŸ’…

restic stats [flags] [snapshot ID] [...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the stats command literally walks one or multiple snapshots in a repository and accumulates statistics about all the data stored in there. it reports the number of unique files and their sizes, according to one of the counting modes you pick with the --mode flag. ✨

it operates on all snapshots matching the selection criteria, or on all snapshots if you don't specify anything. the special snapshot ID latest is also supported (iykyk). some modes make more sense over just a single snapshot, while others are useful across all snapshots β€” depends on what you're trying to calculate, bestie. 🧚

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 πŸ“–

😭 EXIT STATUS 😭

  • exit status is 0 if the command was successful 🫢
  • exit status is 1 if there was any error πŸ’€
  • exit status is 10 if the repository does not exist πŸ™ˆ
  • exit status is 11 if the repository is already locked πŸ”’
  • exit status is 12 if the password is incorrect πŸ”‘

🌈 OPTIONS 🌈

  • -h, --help[=false] β€” help for stats πŸ₯°
  • -H, --host=[] β€” only consider snapshots for this host (can be specified multiple times, use empty string to unset default value) (default: $RESTIC_HOST)
  • --mode="restore-size" β€” counting mode: restore-size (default), files-by-contents, blobs-per-file or raw-data πŸŽ€
  • --path=[] β€” only consider snapshots including this (absolute) path (can be specified multiple times, snapshots must include all specified paths) πŸ›£οΈ
  • --tag=[] β€” only consider snapshots including tag[,tag,...] (can be specified multiple times) 🏷️

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • --cacert=[] β€” file to load root certificates from (default: use system certificates or $RESTIC_CACERT)
  • --cache-dir="" β€” set the cache directory. (default: use system default cache directory) πŸ—‚οΈ
  • --cleanup-cache[=false] β€” auto remove old cache directories 🧹
  • --compression=auto β€” compression mode (only available for repository format version 2), one of (auto|off|fastest|better|max) (default: $RESTIC_COMPRESSION)
  • --http-user-agent="" β€” set a http user agent for outgoing http requests πŸ“‘
  • --insecure-no-password[=false] β€” use an empty password for the repository, must be passed to every restic command (insecure) ⚠️
  • --insecure-tls[=false] β€” skip TLS certificate verification when connecting to the repository (insecure) ⚠️
  • --json[=false] β€” set output mode to JSON for commands that support it πŸ”₯
  • --key-hint="" β€” key ID of key to try decrypting first (default: $RESTIC_KEY_HINT)
  • --limit-download=0 β€” limits downloads to a maximum rate in KiB/s. (default: unlimited)
  • --limit-upload=0 β€” limits uploads to a maximum rate in KiB/s. (default: unlimited)
  • --no-cache[=false] β€” do not use a local cache 🚫
  • --no-extra-verify[=false] β€” skip additional verification of data before upload (see documentation)
  • --no-lock[=false] β€” do not lock the repository, this allows some operations on read-only repositories πŸ”“
  • -o, --option=[] β€” set extended option (key=value, can be specified multiple times) πŸ“
  • --pack-size=0 β€” set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
  • --password-command="" β€” shell command to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND) 🐚
  • -p, --password-file="" β€” file to read the repository password from (default: $RESTIC_PASSWORD_FILE)
  • -q, --quiet[=false] β€” do not output comprehensive progress report 🀫
  • -r, --repo="" β€” repository to backup to or restore from (default: $RESTIC_REPOSITORY)
  • --repository-file="" β€” file to read the repository location from (default: $RESTIC_REPOSITORY_FILE)
  • --retry-lock=0s β€” retry to lock the repository if it is already locked, takes a value like 5m or 2h (default: no retries) ⏰
  • --stuck-request-timeout=5m0s β€” duration after which to retry stuck requests βŒ›
  • --tls-client-cert="" β€” path to a file containing PEM encoded TLS client certificate and private key (default: $RESTIC_TLS_CLIENT_CERT) πŸ”
  • -v, --verbose[=0] β€” be verbose (specify multiple times or a level using --verbose=n, max level/times is 2) πŸ—£οΈ

πŸ’œ SEE ALSO πŸ’œ


that's the whole page, bestie β€” go count some blobs πŸ’–

this lil' page was generated by restic generate, dated Jan 2017, and it's the restic backup(1) manual's baby sibling. periodt. βœ¨πŸŽ€

πŸ“¦ where this page comes from