OK, so at work there is a backup server that has various cronjob scripts that run nightly to backup various production servers. This machine was recently upgrade to accommodate larger hard disks. We took the opportunity to use Solaris 11 with ZFS. Since we already use cronjobs, I wanted to have the automatic snapshots and backup scripts all controlled from one place, rather than using svcs.
At midnight every night the backup scripts launch. So just before this, at half 11, the snapshot_daily script will launch.
The general idea is that it makes the daily snapshot and lists the daily snapshots in order (newest to oldest), but skips the first few denoted by the
RETENTION variable (in this case set to 7). Then it deletes them.
I know there are other more sophisticated ways of doing this, but I like the simplicity.
Quick notes for myself really. I wanted to install zfs-fuse on centos. This is how I did it.