1restic backup(1) restic backup(1)
2
3
4
6 restic-stats - Scan the repository and show basic statistics
7
8
9
11 restic stats [flags] [snapshot ID] [...]
12
13
14
16 The "stats" command walks one or multiple snapshots in a repository and
17 accumulates statistics about the data stored therein. It reports on the
18 number of unique files and their sizes, according to one of the count‐
19 ing modes as given by the --mode flag.
20
21
22 It operates on all snapshots matching the selection criteria or all
23 snapshots if nothing is specified. The special snapshot ID "latest" is
24 also supported. Some modes make more sense over just a single snapshot,
25 while others are useful across all snapshots, depending on what you are
26 trying to calculate.
27
28
29 The modes are:
30
31
32 • restore-size: (default) Counts the size of the restored files.
33
34 • files-by-contents: Counts total size of files, where a file is
35 considered unique if it has unique contents.
36
37 • raw-data: Counts the size of blobs in the repository, regard‐
38 less of how many files reference them.
39
40 • blobs-per-file: A combination of files-by-contents and raw-
41 data.
42
43
44
45 Refer to the online manual for more details about each mode.
46
47
48
50 Exit status is 0 if the command was successful, and non-zero if there
51 was any error.
52
53
54
56 -h, --help[=false] help for stats
57
58
59 -H, --host=[] only consider snapshots for this host (can be speci‐
60 fied multiple times)
61
62
63 --mode="restore-size" counting mode: restore-size (default),
64 files-by-contents, blobs-per-file or raw-data
65
66
67 --path=[] only consider snapshots including this (absolute) path
68 (can be specified multiple times)
69
70
71 --tag=[] only consider snapshots including tag[,tag,...] (can be
72 specified multiple times)
73
74
75
77 --cacert=[] file to load root certificates from (default: use sys‐
78 tem certificates)
79
80
81 --cache-dir="" set the cache directory. (default: use system de‐
82 fault cache directory)
83
84
85 --cleanup-cache[=false] auto remove old cache directories
86
87
88 --compression=auto compression mode (only available for repository
89 format version 2), one of (auto|off|max)
90
91
92 --insecure-tls[=false] skip TLS certificate verification when con‐
93 necting to the repository (insecure)
94
95
96 --json[=false] set output mode to JSON for commands that support
97 it
98
99
100 --key-hint="" key ID of key to try decrypting first (default:
101 $RESTIC_KEY_HINT)
102
103
104 --limit-download=0 limits downloads to a maximum rate in KiB/s.
105 (default: unlimited)
106
107
108 --limit-upload=0 limits uploads to a maximum rate in KiB/s. (de‐
109 fault: unlimited)
110
111
112 --no-cache[=false] do not use a local cache
113
114
115 --no-lock[=false] do not lock the repository, this allows some op‐
116 erations on read-only repositories
117
118
119 -o, --option=[] set extended option (key=value, can be specified
120 multiple times)
121
122
123 --pack-size=0 set target pack size in MiB, created pack files may
124 be larger (default: $RESTIC_PACK_SIZE)
125
126
127 --password-command="" shell command to obtain the repository pass‐
128 word from (default: $RESTIC_PASSWORD_COMMAND)
129
130
131 -p, --password-file="" file to read the repository password from
132 (default: $RESTIC_PASSWORD_FILE)
133
134
135 -q, --quiet[=false] do not output comprehensive progress report
136
137
138 -r, --repo="" repository to backup to or restore from (default:
139 $RESTIC_REPOSITORY)
140
141
142 --repository-file="" file to read the repository location from
143 (default: $RESTIC_REPOSITORY_FILE)
144
145
146 --tls-client-cert="" path to a file containing PEM encoded TLS
147 client certificate and private key
148
149
150 -v, --verbose[=0] be verbose (specify multiple times or a level
151 using --verbose=n``, max level/times is 2)
152
153
154
156 restic(1)
157
158
159
160generated by restic generate Jan 2017 restic backup(1)