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

NAME

6       restic-rewrite - Rewrite snapshots to exclude unwanted files
7
8
9

SYNOPSIS

11       restic rewrite [flags] [snapshotID ...]
12
13
14

DESCRIPTION

16       The  "rewrite"  command excludes files from existing snapshots. It cre‐
17       ates new snapshots containing the same data as the original  ones,  but
18       without  the  files  you  specify to exclude. All metadata (time, host,
19       tags) will be preserved.
20
21
22       The snapshots to rewrite are specified  using  the  --host,  --tag  and
23       --path  options,  or  by  providing a list of snapshot IDs. Please note
24       that specifying neither any of these options nor  a  snapshot  ID  will
25       cause the command to rewrite all snapshots.
26
27
28       The special tag 'rewrite' will be added to the new snapshots to distin‐
29       guish them from the original ones, unless  --forget  is  used.  If  the
30       --forget  option  is  used,  the original snapshots will instead be di‐
31       rectly removed from the repository.
32
33
34       Please note that the --forget option only removes the snapshots and not
35       the  actual  data  stored  in the repository. In order to delete the no
36       longer referenced data, use the "prune" command.
37
38
39

EXIT STATUS

41       Exit status is 0 if the command was successful, and non-zero  if  there
42       was any error.
43
44
45

OPTIONS

47       -n, --dry-run[=false]      do not do anything, just print what would be
48       done
49
50
51       -e, --exclude=[]      exclude a  pattern  (can  be  specified  multiple
52       times)
53
54
55       --exclude-file=[]      read exclude patterns from a file (can be speci‐
56       fied multiple times)
57
58
59       --forget[=false]      remove original snapshots after creating new ones
60
61
62       -h, --help[=false]      help for rewrite
63
64
65       -H, --host=[]      only consider snapshots for this host (can be speci‐
66       fied multiple times)
67
68
69       --iexclude=[]       same as --exclude pattern but ignores the casing of
70       filenames
71
72
73       --iexclude-file=[]      same as --exclude-file but  ignores  casing  of
74       filenames in patterns
75
76
77       --path=[]       only  consider snapshots including this (absolute) path
78       (can be specified multiple times)
79
80
81       --tag=[]      only consider snapshots including tag[,tag,...]  (can  be
82       specified multiple times)
83
84
85

OPTIONS INHERITED FROM PARENT COMMANDS

87       --cacert=[]      file to load root certificates from (default: use sys‐
88       tem certificates or $RESTIC_CACERT)
89
90
91       --cache-dir=""      set the cache directory. (default: use  system  de‐
92       fault cache directory)
93
94
95       --cleanup-cache[=false]      auto remove old cache directories
96
97
98       --compression=auto      compression mode (only available for repository
99       format version 2), one of (auto|off|max) (default: $RESTIC_COMPRESSION)
100
101
102       --insecure-tls[=false]      skip TLS certificate verification when con‐
103       necting to the repository (insecure)
104
105
106       --json[=false]       set  output mode to JSON for commands that support
107       it
108
109
110       --key-hint=""      key ID of key  to  try  decrypting  first  (default:
111       $RESTIC_KEY_HINT)
112
113
114       --limit-download=0       limits  downloads  to a maximum rate in KiB/s.
115       (default: unlimited)
116
117
118       --limit-upload=0      limits uploads to a maximum rate in  KiB/s.  (de‐
119       fault: unlimited)
120
121
122       --no-cache[=false]      do not use a local cache
123
124
125       --no-lock[=false]      do not lock the repository, this allows some op‐
126       erations on read-only repositories
127
128
129       -o, --option=[]      set extended option (key=value, can  be  specified
130       multiple times)
131
132
133       --pack-size=0       set target pack size in MiB, created pack files may
134       be larger (default: $RESTIC_PACK_SIZE)
135
136
137       --password-command=""      shell command to obtain the repository pass‐
138       word from (default: $RESTIC_PASSWORD_COMMAND)
139
140
141       -p,  --password-file=""       file to read the repository password from
142       (default: $RESTIC_PASSWORD_FILE)
143
144
145       -q, --quiet[=false]      do not output comprehensive progress report
146
147
148       -r, --repo=""      repository to backup to or  restore  from  (default:
149       $RESTIC_REPOSITORY)
150
151
152       --repository-file=""       file  to  read  the repository location from
153       (default: $RESTIC_REPOSITORY_FILE)
154
155
156       --retry-lock=0s      retry to lock the  repository  if  it  is  already
157       locked, takes a value like 5m or 2h (default: no retries)
158
159
160       --tls-client-cert=""       path  to  a  file containing PEM encoded TLS
161       client certificate and private key (default: $RESTIC_TLS_CLIENT_CERT)
162
163
164       -v, --verbose[=0]      be verbose (specify multiple times  or  a  level
165       using --verbose=n``, max level/times is 2)
166
167
168

SEE ALSO

170       restic(1)
171
172
173
174generated by restic generate       Jan 2017                   restic backup(1)
Impressum