Using zfSnap with periodic scripts

To use zfSnap periodic scripts you need to edit ’‘/etc/crontab’’

For hourly and reboot scripts to work you need to add these lines to your ’‘/etc/crontab’’

4        *       *       *       *       root    periodic hourly
@reboot                                  root    periodic reboot

Create snapshots

Possible values: YES|NO

Pass generic flags to zfSnap.

You should not pass -v and -d flags.

Non-recursive snapshots

List of zfs filesystems to create non-recursive snapshots

Recursive snapshots

List of zfs filesystems to create recursive snapshots

Verbose output

Possible values: YES|NO

Set prefix

Create snapshots with prefix (by default prefix will be “hourly-”, “daily-”, “weekly-”, “monthly-” or “reboot-”)

Override default prefix

Override default Time To Live

By default ttl for hourly snapshots = 3d, for daily and reboot = 1w, for weekly = 1m, for monthly = 6m

Old snapshot deletion

Possible values: YES|NO

Delete old snapshots with prefixes

Prefixes should be separated with space.

Deletion of old snapshots with “hourly-”, “daily-”, “weekly-”, “monthly-” and “reboot-” prefixes is hard-coded.

Example periodic.conf

hourly_zfsnap_enable="YES"
hourly_zfsnap_recursive_fs="zpool/root zpool/home"
hourly_zfsnap_verbose="YES"
hourly_zfsnap_flags="-s -S"

reboot_zfsnap_enable="YES"
reboot_zfsnap_recursive_fs="zpool/root zpool/home"
reboot_zfsnap_verbose="YES"
reboot_zfsnap_flags="-s -S"

daily_zfsnap_delete_enable="YES"
daily_zfsnap_delete_flags="-s -S"
daily_zfsnap_delete_verbose="YES"