1restic backup(1)                                              restic backup(1)
2
3
4

NAME

6       restic-backup - Create a new backup of files and/or directories
7
8
9

SYNOPSIS

11       restic backup [flags] [FILE/DIR] ...
12
13
14

DESCRIPTION

16       The "backup" command creates a new snapshot and saves the files and di‐
17       rectories given as the arguments.
18
19
20

EXIT STATUS

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

OPTIONS

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       -g, --group-by=host,paths      group snapshots by  host,  paths  and/or
72       tags, separated by comma (disable grouping with '')
73
74
75       -h, --help[=false]      help for backup
76
77
78       -H,  --host=""      set the hostname for the snapshot manually. To pre‐
79       vent an expensive rescan use the "parent" flag
80
81
82       --iexclude=[]      same as --exclude pattern but ignores the casing  of
83       filenames
84
85
86       --iexclude-file=[]       same  as  --exclude-file but ignores casing of
87       filenames in patterns
88
89
90       --ignore-ctime[=false]      ignore ctime changes when checking for mod‐
91       ified files
92
93
94       --ignore-inode[=false]       ignore  inode number changes when checking
95       for modified files
96
97
98       --no-scan[=false]      do not run scanner to estimate size of backup
99
100
101       -x, --one-file-system[=false]      exclude other  file  systems,  don't
102       cross filesystem boundaries and subvolumes
103
104
105       --parent=""       use this parent snapshot (default: latest snapshot in
106       the group determined by --group-by and not newer than the timestamp de‐
107       termined by --time)
108
109
110       --read-concurrency=0        read   n   files   concurrently   (default:
111       $RESTIC_READ_CONCURRENCY or 2)
112
113
114       --stdin[=false]      read backup from stdin
115
116
117       --stdin-filename="stdin"      filename to use when reading from stdin
118
119
120       --tag=[]      add tags for the new snapshot in the format tag[,tag,...]
121       (can be specified multiple times)
122
123
124       --time=""      time of the backup (ex. '2012-11-01 22:08:41') (default:
125       now)
126
127
128       --with-atime[=false]      store the atime for all files and directories
129
130
131

OPTIONS INHERITED FROM PARENT COMMANDS

133       --cacert=[]      file to load root certificates from (default: use sys‐
134       tem certificates or $RESTIC_CACERT)
135
136
137       --cache-dir=""       set  the cache directory. (default: use system de‐
138       fault cache directory)
139
140
141       --cleanup-cache[=false]      auto remove old cache directories
142
143
144       --compression=auto      compression mode (only available for repository
145       format version 2), one of (auto|off|max) (default: $RESTIC_COMPRESSION)
146
147
148       --insecure-tls[=false]      skip TLS certificate verification when con‐
149       necting to the repository (insecure)
150
151
152       --json[=false]      set output mode to JSON for commands  that  support
153       it
154
155
156       --key-hint=""       key  ID  of  key  to try decrypting first (default:
157       $RESTIC_KEY_HINT)
158
159
160       --limit-download=0      limits downloads to a maximum  rate  in  KiB/s.
161       (default: unlimited)
162
163
164       --limit-upload=0       limits  uploads to a maximum rate in KiB/s. (de‐
165       fault: unlimited)
166
167
168       --no-cache[=false]      do not use a local cache
169
170
171       --no-lock[=false]      do not lock the repository, this allows some op‐
172       erations on read-only repositories
173
174
175       -o,  --option=[]       set extended option (key=value, can be specified
176       multiple times)
177
178
179       --pack-size=0      set target pack size in MiB, created pack files  may
180       be larger (default: $RESTIC_PACK_SIZE)
181
182
183       --password-command=""      shell command to obtain the repository pass‐
184       word from (default: $RESTIC_PASSWORD_COMMAND)
185
186
187       -p, --password-file=""      file to read the repository  password  from
188       (default: $RESTIC_PASSWORD_FILE)
189
190
191       -q, --quiet[=false]      do not output comprehensive progress report
192
193
194       -r,  --repo=""       repository  to backup to or restore from (default:
195       $RESTIC_REPOSITORY)
196
197
198       --repository-file=""      file to read  the  repository  location  from
199       (default: $RESTIC_REPOSITORY_FILE)
200
201
202       --retry-lock=0s       retry  to  lock  the  repository if it is already
203       locked, takes a value like 5m or 2h (default: no retries)
204
205
206       --tls-client-cert=""      path to a file  containing  PEM  encoded  TLS
207       client certificate and private key (default: $RESTIC_TLS_CLIENT_CERT)
208
209
210       -v,  --verbose[=0]       be  verbose (specify multiple times or a level
211       using --verbose=n``, max level/times is 2)
212
213
214

SEE ALSO

216       restic(1)
217
218
219
220generated by restic generate       Jan 2017                   restic backup(1)
Impressum