96 |
rodolico |
1 |
$config = {
|
|
|
2 |
# if set to non-zero, will write output to /tmp/snapShot instead of executing commands
|
|
|
3 |
'TESTING' => 1,
|
122 |
rodolico |
4 |
# if set to non-zero, sets TESTING to 1, then dumps some information on STDOUT when processing
|
|
|
5 |
'DEBUG' => 0,
|
96 |
rodolico |
6 |
# amount of slop in deciding whether to make a snapshot or not
|
|
|
7 |
'slop' => '2 hour',
|
|
|
8 |
# this is an array reference of the columns in standard zfs list output
|
|
|
9 |
'listingKeys' => [ qw/name used avail refer mountpoint/ ],
|
|
|
10 |
# Information on how to read/create snapshots
|
|
|
11 |
'snapshot' => {
|
|
|
12 |
# template used for creating a snapshot using strftime
|
|
|
13 |
'template' => 'auto-%Y-%m-%d_%H-%M',
|
|
|
14 |
# regex to parse snapshots created above. Only snapshots matching
|
|
|
15 |
# this will be processed
|
|
|
16 |
'parse' => 'auto-(\d{4})-(\d{2})-(\d{2})_(\d{2})-(\d{2})',
|
|
|
17 |
# Which fields result from parsing above
|
|
|
18 |
'parseFields' => [ qw/year month day hour minute/ ],
|
|
|
19 |
},
|
|
|
20 |
# the datasets we care about
|
|
|
21 |
'datasets' => {
|
|
|
22 |
# this will match storage/nfs_root and all child datasets (recursive)
|
|
|
23 |
'storage\/nfs_root' => {
|
|
|
24 |
'frequency' => '1 day',
|
|
|
25 |
'retention' => '7 day',
|
|
|
26 |
'recursive' => 1
|
|
|
27 |
},
|
|
|
28 |
# simple match for storage/backups
|
|
|
29 |
'storage\/backups' => {
|
|
|
30 |
'frequency' => '1 day',
|
|
|
31 |
'retention' => '7 day',
|
|
|
32 |
'recursive' => 0
|
|
|
33 |
},
|
|
|
34 |
# this would match anything in dataset storage which has a child ending in disk or lvm, where disk may optionally be followed
|
|
|
35 |
# by a single character (disk1, disk0, diska, disk). Note the use of parantheses around the alternating patterns disk and lvm
|
|
|
36 |
'storage\/.*((disk.?)|(lvm))' => {
|
|
|
37 |
'frequency' => '1 month',
|
|
|
38 |
'retention' => '7 month',
|
|
|
39 |
'recursive' => 0
|
|
|
40 |
}
|
|
|
41 |
}
|
|
|
42 |
};
|