forked from calmh/zsnapper.old
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzsnapper.ini
92 lines (69 loc) · 2.38 KB
/
zsnapper.ini
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
;;; Datasets ;;;
; Define datasets to be snapshotted. Each section should be named
; [datasets.<name>] where name is an alphanumeric word. Each section contains
; one or more match[] definitions. Each match[] should match one or more ZFS
; datasets.
;
; Wildcards (* and ?) can be used and are interpreted as common shell globs.
; Note that these match dataset names as reported by zfs list, not mountpoint
; in the filesystem.
;
; A special form of shell expansion $(command) can also be used. The command
; is executed and each line returned on stdout is substituted as a match.
; Match datasets for installed VMs but not images. This is done by calling
; vmadm list to get a list of uuids and matching with a single * to capture
; ${uuid}-disk* as well as just ${uuid} itself.
[datasets.vm]
match[] = zones/$(vmadm list -p -o uuid)*
; Match some system directories.
[datasets.system]
match[] = zones/opt
match[] = zones/usbkey
match[] = zones/var
; Match an extra dataset I use for NFS exports.
[datasets.extra]
match[] = zones/srv
; Match selected extra datasets.
[datasets.selextra]
match[] = zones/srv/git
match[] = zones/srv/foto
;;; Schedules ;;;
; Define schedules to be executed. Each schedule is named by [schedule.<name>].
; The name will be present in the snapshot name, i.e. for the dataset
; "zones/srv" and schedule "hourly", snapshots will be created named similarly
; to "zones/src@hourly-20130602T200000Z". The schedule field is a common cron
; string defining when the job is triggered. The dataset[] field refers to the
; dataset definitions from above. Finally, the keep field defines how many
; snapshots are kept historically.
; Keep an hours worth of five-minute snapshots of all interesting datasets.
[schedule.quick]
schedule = */5 * * * *
keep = 12
dataset[] = vm
dataset[] = system
dataset[] = extra
; Keep 12 hourly snapshots of everything.
[schedule.hourly]
schedule = 0 * * * *
keep = 12
dataset[] = vm
dataset[] = system
dataset[] = extra
; Keep a week of daily snapshots of VMs and the extra datasets.
[schedule.daily]
schedule = 0 0 * * *
keep = 7
dataset[] = vm
dataset[] = extra
; Keep a month of weekly snapshots of VMs and the extra datasets.
[schedule.weekly]
schedule = 0 0 * * 1
keep = 4
dataset[] = vm
dataset[] = selextra
; Keep a year of monthly snapshots for the extra datasets.
[schedule.monthly]
schedule = 0 0 1 * *
keep = 12
dataset[] = vm
dataset[] = selextra