Subversion Repositories sysadmin_scripts

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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