1restic backup(1) restic backup(1)
2
3
4
6 restic-backup - Create a new backup of files and/or directories
7
8
9
11 restic backup [flags] [FILE/DIR] ...
12
13
14
16 The "backup" command creates a new snapshot and saves the files and di‐
17 rectories given as the arguments.
18
19
20
22 Exit status is 0 if the command was successful. Exit status is 1 if
23 there was a fatal error (no snapshot created). Exit status is 3 if
24 some source data could not be read (incomplete snapshot created).
25
26
27
29 -n, --dry-run[=false] do not upload or write any data, just show
30 what would be done
31
32
33 -e, --exclude=[] exclude a pattern (can be specified multiple
34 times)
35
36
37 --exclude-caches[=false] excludes cache directories that are
38 marked with a CACHEDIR.TAG file. See https://bford.info/cachedir/ for
39 the Cache Directory Tagging Standard
40
41
42 --exclude-file=[] read exclude patterns from a file (can be speci‐
43 fied multiple times)
44
45
46 --exclude-if-present=[] takes filename[:header], exclude contents
47 of directories containing filename (except filename itself) if header
48 of that file is as provided (can be specified multiple times)
49
50
51 --exclude-larger-than="" max size of the files to be backed up
52 (allowed suffixes: k/K, m/M, g/G, t/T)
53
54
55 --files-from=[] read the files to backup from file (can be com‐
56 bined with file args; can be specified multiple times)
57
58
59 --files-from-raw=[] read the files to backup from file (can be
60 combined with file args; can be specified multiple times)
61
62
63 --files-from-verbatim=[] read the files to backup from file (can
64 be combined with file args; can be specified multiple times)
65
66
67 -f, --force[=false] force re-reading the target files/directories
68 (overrides the "parent" flag)
69
70
71 -h, --help[=false] help for backup
72
73
74 -H, --host="" set the hostname for the snapshot manually. To pre‐
75 vent an expensive rescan use the "parent" flag
76
77
78 --iexclude=[] same as --exclude pattern but ignores the casing of
79 filenames
80
81
82 --iexclude-file=[] same as --exclude-file but ignores casing of
83 filenames in patterns
84
85
86 --ignore-ctime[=false] ignore ctime changes when checking for mod‐
87 ified files
88
89
90 --ignore-inode[=false] ignore inode number changes when checking
91 for modified files
92
93
94 -x, --one-file-system[=false] exclude other file systems, don't
95 cross filesystem boundaries and subvolumes
96
97
98 --parent="" use this parent snapshot (default: last snapshot in
99 the repository that has the same target files/directories, and is not
100 newer than the snapshot time)
101
102
103 --stdin[=false] read backup from stdin
104
105
106 --stdin-filename="stdin" filename to use when reading from stdin
107
108
109 --tag=[] add tags for the new snapshot in the format tag[,tag,...]
110 (can be specified multiple times)
111
112
113 --time="" time of the backup (ex. '2012-11-01 22:08:41') (default:
114 now)
115
116
117 --with-atime[=false] store the atime for all files and directories
118
119
120
122 --cacert=[] file to load root certificates from (default: use sys‐
123 tem certificates)
124
125
126 --cache-dir="" set the cache directory. (default: use system de‐
127 fault cache directory)
128
129
130 --cleanup-cache[=false] auto remove old cache directories
131
132
133 --compression=auto compression mode (only available for repository
134 format version 2), one of (auto|off|max)
135
136
137 --insecure-tls[=false] skip TLS certificate verification when con‐
138 necting to the repository (insecure)
139
140
141 --json[=false] set output mode to JSON for commands that support
142 it
143
144
145 --key-hint="" key ID of key to try decrypting first (default:
146 $RESTIC_KEY_HINT)
147
148
149 --limit-download=0 limits downloads to a maximum rate in KiB/s.
150 (default: unlimited)
151
152
153 --limit-upload=0 limits uploads to a maximum rate in KiB/s. (de‐
154 fault: unlimited)
155
156
157 --no-cache[=false] do not use a local cache
158
159
160 --no-lock[=false] do not lock the repository, this allows some op‐
161 erations on read-only repositories
162
163
164 -o, --option=[] set extended option (key=value, can be specified
165 multiple times)
166
167
168 --pack-size=0 set target pack size in MiB, created pack files may
169 be larger (default: $RESTIC_PACK_SIZE)
170
171
172 --password-command="" shell command to obtain the repository pass‐
173 word from (default: $RESTIC_PASSWORD_COMMAND)
174
175
176 -p, --password-file="" file to read the repository password from
177 (default: $RESTIC_PASSWORD_FILE)
178
179
180 -q, --quiet[=false] do not output comprehensive progress report
181
182
183 -r, --repo="" repository to backup to or restore from (default:
184 $RESTIC_REPOSITORY)
185
186
187 --repository-file="" file to read the repository location from
188 (default: $RESTIC_REPOSITORY_FILE)
189
190
191 --tls-client-cert="" path to a file containing PEM encoded TLS
192 client certificate and private key
193
194
195 -v, --verbose[=0] be verbose (specify multiple times or a level
196 using --verbose=n, max level/times is 3)
197
198
199
201 restic(1)
202
203
204
205generated by restic generate Jan 2017 restic backup(1)