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       -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       --no-scan[=false]      do not run scanner to estimate size of backup
95
96
97       -x,  --one-file-system[=false]       exclude  other file systems, don't
98       cross filesystem boundaries and subvolumes
99
100
101       --parent=""      use this parent snapshot (default:  last  snapshot  in
102       the  repository  that has the same target files/directories, and is not
103       newer than the snapshot time)
104
105
106       --read-concurrency=0        read   n   files   concurrently   (default:
107       $RESTIC_READ_CONCURRENCY or 2)
108
109
110       --stdin[=false]      read backup from stdin
111
112
113       --stdin-filename="stdin"      filename to use when reading from stdin
114
115
116       --tag=[]      add tags for the new snapshot in the format tag[,tag,...]
117       (can be specified multiple times)
118
119
120       --time=""      time of the backup (ex. '2012-11-01 22:08:41') (default:
121       now)
122
123
124       --with-atime[=false]      store the atime for all files and directories
125
126
127

OPTIONS INHERITED FROM PARENT COMMANDS

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

SEE ALSO

208       restic(1)
209
210
211
212generated by restic generate       Jan 2017                   restic backup(1)
Impressum