| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- ;;; 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
|