-
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathdev.yaml
More file actions
366 lines (328 loc) · 8.44 KB
/
Copy pathdev.yaml
File metadata and controls
366 lines (328 loc) · 8.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# yaml-language-server: $schema=https://creativeprojects.github.io/resticprofile/jsonschema/config.json
version: "1"
global:
default-command: snapshots
initialize: false
priority: low
prevent-sleep: true
# scheduler: "crontab:*:crontab"
group-continue-on-error: true
restic-lock-retry-after: "1m"
# log: "_global.txt"
groups:
full-backup:
- src
- root
default:
description: Contains default parameters like repository and password file
env:
tmp: /tmp
initialize: false
cleanup-cache: true
password-file: key
repository: "/Volumes/RAMDisk/{{ .Profile.Name }}"
# lock: "/Volumes/RAMDisk/resticprofile-{{ .Profile.Name }}.lock"
copy:
initialize: true
# initialize-copy-chunker-params: true
password-file: key
repository: "/Volumes/RAMDisk/{{ .Profile.Name }}-copy"
repo2:
description: Copy of default repo
initialize: true
password-file: key
repository: "/Volumes/RAMDisk/{{ .Profile.Name }}"
init:
copy-chunker-params: true
from-repository: "/Volumes/RAMDisk/default"
from-password-file: key
space:
description: Repository contains space
initialize: false
password-file: key
repository: "/Volumes/RAMDisk/with space"
documents:
inherit: default
backup:
source: ~/Documents
initialize: false
repository: ~/backup/$PROFILE_NAME
root:
backup:
schedule: "*:0,15,30,45"
exclude-caches: true
exclude-file:
- root-excludes
- excludes
one-file-system: false
source:
- .
inherit: default
initialize: true
retention:
after-backup: true
before-backup: false
compact: false
host: true
keep-daily: 1
keep-hourly: 1
keep-last: 3
keep-monthly: 1
keep-tag:
- forever
keep-weekly: 1
keep-within: 3h
keep-yearly: 1
prune: false
forget:
host: true
keep-daily: 1
keep-hourly: 1
keep-last: 3
keep-monthly: 1
keep-tag:
- forever
keep-weekly: 1
keep-within: 3h
keep-yearly: 1
prune: false
self:
force-inactive-lock: true
initialize: true
inherit: default
# status-file: /Volumes/RAMDisk/status.json
backup:
extended-status: false
check-before: true
no-error-on-warning: true
source:
- "{{ .CurrentDir }}"
exclude:
- "/**/.git/"
schedule:
- "*:00,30,36,50,55"
- "2020-01-01"
schedule-permission: user_logged_on
schedule-log: "_schedule-log.txt"
schedule-after-network-online: true
skip-if-unchanged: true
run-before:
- "echo DOW=`date +\"%u\"` >> {{ env }}"
run-after-fail:
- "echo restic returned an error, command line = ${ERROR_COMMANDLINE}"
- "echo restic stderr = ${RESTIC_STDERR}"
check:
read-data-subset: "$DOW/7"
schedule:
- "*:05,10,15,20,25,35"
schedule-permission: user
run-before:
- "echo Check started"
run-after:
- "echo Check done"
send-before:
- url: "https://httpbin.org/status/400"
send-after:
- url: "https://httpbin.org/status/400"
init:
run-before:
- "echo Init started"
run-after:
- "echo Init done"
send-before:
- url: "https://httpbin.org/status/400"
send-after:
- url: "https://httpbin.org/status/400"
retention:
after-backup: true
keep-last: 30
group-by: host
# forget:
# schedule: "weekly"
# schedule-permission: system
# copy:
# initialize: true
# snapshot: latest
# schedule:
# - "*:45"
snapshots:
host: true
run-before:
- "env"
- "echo STEP=Before >> {{ env }}"
- "echo \"$STEP ($Step)\""
run-after:
- "echo Step=After >> {{ env }}"
- "echo \"$Step ($STEP)\""
syslog:
force-inactive-lock: true
initialize: true
inherit: default
backup:
verbose: true
no-error-on-warning: true
source: "{{ .CurrentDir }}"
exclude:
- "/**/.git/"
schedule:
- "*:*"
schedule-permission: user
schedule-log: "syslog://localhost:5514"
prom:
force-inactive-lock: true
initialize: true
inherit: default
prometheus-save-to-file: "self.prom"
prometheus-push: "http://localhost:9091/"
# prometheus-labels:
# host: "{{ .Hostname }}"
status-file: /Volumes/RAMDisk/status.json
backup:
check-after: true
extended-status: true
no-error-on-warning: true
source:
- "{{ .CurrentDir }}"
retention:
after-backup: true
keep-last: 30
system:
initialize: true
no-cache: true
inherit: default
backup:
source: ./
schedule:
- "*:5,10,20,25,35,40,50,55"
schedule-permission: system
forget:
schedule: "weekly"
src:
backup:
check-before: true
exclude:
- /**/.git
exclude-caches: true
one-file-system: false
run-after: echo All Done!
run-before:
- "echo Hello {{ .Env.LOGNAME }}"
- "echo current dir: {{ .CurrentDir }}"
- "echo config dir: {{ .ConfigDir }}"
# - "echo profile started at {{ .Now.Format "02 Jan 06 15:04 MST" }}"
source:
- "{{ .Env.HOME }}/go/src"
inherit: default
initialize: true
retention:
after-backup: true
before-backup: false
compact: false
keep-within: 30d
prune: true
home:
inherit: default
repository: ${HOME}/backup/$PROFILE_NAME
backup:
source: "${HOME}/Projects"
stream-error:
- pattern: "find-one"
run: "echo Found One!"
- pattern: "find-two"
run: "echo Found Two!"
stdin:
backup:
stdin: true
stdin-filename: stdin-test
inherit: default
stdin-command:
backup:
stdin-command:
- "cat *.go | gzip"
- "cat shell/*.go | gzip"
stdin-filename: stdin-test
inherit: default
escape:
initialize: true
inherit: default
backup:
source:
- "{{ .CurrentDir }}/examples/private/file with space"
- '{{ .CurrentDir }}/examples/private/quoted"file'
- "{{ .CurrentDir }}/examples/private/Côte d'Ivoire"
exclude:
- "**/.git"
- quoted"file
- Côte d'Ivoire
retention:
after-backup: true
nobackup:
initialize: false
repository: /Volumes/RAMDisk/{{ .Profile.Name }}
password-command: echo test
status-file: /Volumes/RAMDisk/status.json
copy:
initialize: false
repository: /Volumes/RAMDisk/{{ .Profile.Name }}_copy
password-command2: echo test
copytag:
inherit: default
backup:
source:
- "."
- "{{ .CurrentDir }}"
exclude: "private"
snapshots:
tag: true
forget:
tag: true
retention:
after-backup: true
tag: true
copypath:
inherit: default
backup:
source:
- "."
- "{{ .CurrentDir }}"
- ".*"
exclude: "private"
snapshots:
path: false
forget:
path: true
retention:
after-backup: true
keep-last: 3
path: true
run-before-after:
inherit: default
snapshots:
host: true
run-before: "echo Before snapshots"
run-after: "echo After snapshots"
tempfile:
inherit: default
backup:
verbose: true
no-error-on-warning: true
source: "{{ .CurrentDir }}"
exclude:
- "/**/.git/"
schedule:
- "*:*"
schedule-permission: user
schedule-log: '{{ tempFile "backup.log" }}'
run-finally: 'cp {{ tempFile "backup.log" }} ./backup{{ .Now.Format "2006-01-02T15-04-05" }}.log'
empty-fields:
inherit: default
retention:
before-backup: false
after-backup: true
keep-tag: ""
group-by: ""
tag: ""
nopwd:
initialize: true
repository: "/Volumes/RAMDisk/{{ .Profile.Name }}"
insecure-no-password: true