zfs basic snapschedule

#snapshot every minute with retention of three snapshots

while true
do
for i in `zfs list | awk '{print $1}'|grep -v \@|tail +2`
do
zfs destroy ${i}@sched3
zfs rename ${i}@sched2 ${i}@sched3
zfs rename ${i}@sched1 ${i}@sched2
zfs snapshot ${i}@sched1
done
sleep 60
done

This entry was posted in solaris. Bookmark the permalink.

Comments are closed.