zsnapper.ini 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ;;; Datasets ;;;
  2. ; Define datasets to be snapshotted. Each section should be named
  3. ; [datasets.<name>] where name is an alphanumeric word. Each section contains
  4. ; one or more match[] definitions. Each match[] should match one or more ZFS
  5. ; datasets.
  6. ;
  7. ; Wildcards (* and ?) can be used and are interpreted as common shell globs.
  8. ; Note that these match dataset names as reported by zfs list, not mountpoint
  9. ; in the filesystem.
  10. ;
  11. ; A special form of shell expansion $(command) can also be used. The command
  12. ; is executed and each line returned on stdout is substituted as a match.
  13. ; Match datasets for installed VMs but not images. This is done by calling
  14. ; vmadm list to get a list of uuids and matching with a single * to capture
  15. ; ${uuid}-disk* as well as just ${uuid} itself.
  16. [datasets.vm]
  17. match[] = zones/$(vmadm list -p -o uuid)*
  18. ; Match some system directories.
  19. [datasets.system]
  20. match[] = zones/opt
  21. match[] = zones/usbkey
  22. match[] = zones/var
  23. ; Match an extra dataset I use for NFS exports.
  24. [datasets.extra]
  25. match[] = zones/srv
  26. ; Match selected extra datasets.
  27. [datasets.selextra]
  28. match[] = zones/srv/git
  29. match[] = zones/srv/foto
  30. ;;; Schedules ;;;
  31. ; Define schedules to be executed. Each schedule is named by [schedule.<name>].
  32. ; The name will be present in the snapshot name, i.e. for the dataset
  33. ; "zones/srv" and schedule "hourly", snapshots will be created named similarly
  34. ; to "zones/src@hourly-20130602T200000Z". The schedule field is a common cron
  35. ; string defining when the job is triggered. The dataset[] field refers to the
  36. ; dataset definitions from above. Finally, the keep field defines how many
  37. ; snapshots are kept historically.
  38. ; Keep an hours worth of five-minute snapshots of all interesting datasets.
  39. [schedule.quick]
  40. schedule = */5 * * * *
  41. keep = 12
  42. dataset[] = vm
  43. dataset[] = system
  44. dataset[] = extra
  45. ; Keep 12 hourly snapshots of everything.
  46. [schedule.hourly]
  47. schedule = 0 * * * *
  48. keep = 12
  49. dataset[] = vm
  50. dataset[] = system
  51. dataset[] = extra
  52. ; Keep a week of daily snapshots of VMs and the extra datasets.
  53. [schedule.daily]
  54. schedule = 0 0 * * *
  55. keep = 7
  56. dataset[] = vm
  57. dataset[] = extra
  58. ; Keep a month of weekly snapshots of VMs and the extra datasets.
  59. [schedule.weekly]
  60. schedule = 0 0 * * 1
  61. keep = 4
  62. dataset[] = vm
  63. dataset[] = selextra
  64. ; Keep a year of monthly snapshots for the extra datasets.
  65. [schedule.monthly]
  66. schedule = 0 0 1 * *
  67. keep = 12
  68. dataset[] = vm
  69. dataset[] = selextra