1restic backup(1) restic backup(1)
2
3
4
6 restic-forget - Remove snapshots from the repository
7
8
9
11 restic forget [flags] [snapshot ID] [...]
12
13
14
16 The "forget" command removes snapshots according to a policy. Please
17 note that this command really only deletes the snapshot object in the
18 repository, which is a reference to data stored there. In order to re‐
19 move this (now unreferenced) data after 'forget' was run successfully,
20 see the 'prune' command.
21
22
23
25 Exit status is 0 if the command was successful, and non-zero if there
26 was any error.
27
28
29
31 -l, --keep-last=0 keep the last n snapshots
32
33
34 -H, --keep-hourly=0 keep the last n hourly snapshots
35
36
37 -d, --keep-daily=0 keep the last n daily snapshots
38
39
40 -w, --keep-weekly=0 keep the last n weekly snapshots
41
42
43 -m, --keep-monthly=0 keep the last n monthly snapshots
44
45
46 -y, --keep-yearly=0 keep the last n yearly snapshots
47
48
49 --keep-within= keep snapshots that are newer than duration (eg.
50 1y5m7d2h) relative to the latest snapshot
51
52
53 --keep-within-hourly= keep hourly snapshots that are newer than
54 duration (eg. 1y5m7d2h) relative to the latest snapshot
55
56
57 --keep-within-daily= keep daily snapshots that are newer than du‐
58 ration (eg. 1y5m7d2h) relative to the latest snapshot
59
60
61 --keep-within-weekly= keep weekly snapshots that are newer than
62 duration (eg. 1y5m7d2h) relative to the latest snapshot
63
64
65 --keep-within-monthly= keep monthly snapshots that are newer than
66 duration (eg. 1y5m7d2h) relative to the latest snapshot
67
68
69 --keep-within-yearly= keep yearly snapshots that are newer than
70 duration (eg. 1y5m7d2h) relative to the latest snapshot
71
72
73 --keep-tag=[] keep snapshots with this taglist (can be specified
74 multiple times)
75
76
77 --host=[] only consider snapshots with the given host (can be
78 specified multiple times)
79
80
81 --tag=[] only consider snapshots which include this taglist in the
82 format tag[,tag,...] (can be specified multiple times)
83
84
85 --path=[] only consider snapshots which include this (absolute)
86 path (can be specified multiple times)
87
88
89 -c, --compact[=false] use compact output format
90
91
92 -g, --group-by="host,paths" string for grouping snapshots by
93 host,paths,tags
94
95
96 -n, --dry-run[=false] do not delete anything, just print what
97 would be done
98
99
100 --prune[=false] automatically run the 'prune' command if snapshots
101 have been removed
102
103
104 --max-unused="5%" tolerate given limit of unused data (absolute
105 value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the
106 word 'unlimited')
107
108
109 --max-repack-size="" maximum size to repack (allowed suffixes:
110 k/K, m/M, g/G, t/T)
111
112
113 --repack-cacheable-only[=false] only repack packs which are cache‐
114 able
115
116
117 -h, --help[=false] help for forget
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 --json[=false] set output mode to JSON for commands that support
134 it
135
136
137 --key-hint="" key ID of key to try decrypting first (default:
138 $RESTIC_KEY_HINT)
139
140
141 --limit-download=0 limits downloads to a maximum rate in KiB/s.
142 (default: unlimited)
143
144
145 --limit-upload=0 limits uploads to a maximum rate in KiB/s. (de‐
146 fault: unlimited)
147
148
149 --no-cache[=false] do not use a local cache
150
151
152 --no-lock[=false] do not lock the repository, this allows some op‐
153 erations on read-only repositories
154
155
156 -o, --option=[] set extended option (key=value, can be specified
157 multiple times)
158
159
160 --password-command="" shell command to obtain the repository pass‐
161 word from (default: $RESTIC_PASSWORD_COMMAND)
162
163
164 -p, --password-file="" file to read the repository password from
165 (default: $RESTIC_PASSWORD_FILE)
166
167
168 -q, --quiet[=false] do not output comprehensive progress report
169
170
171 -r, --repo="" repository to backup to or restore from (default:
172 $RESTIC_REPOSITORY)
173
174
175 --repository-file="" file to read the repository location from
176 (default: $RESTIC_REPOSITORY_FILE)
177
178
179 --tls-client-cert="" path to a file containing PEM encoded TLS
180 client certificate and private key
181
182
183 -v, --verbose[=0] be verbose (specify multiple times or a level
184 using --verbose=n, max level/times is 3)
185
186
187
189 restic(1)
190
191
192
193generated by restic generate Jan 2017 restic backup(1)