I decided to change the name of the example script again.
[zfs-nexenta/.git] / zfs-autosnap-wrapper
diff --git a/zfs-autosnap-wrapper b/zfs-autosnap-wrapper
new file mode 100755 (executable)
index 0000000..5892976
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Author: Alan J. Pippin
+# Description: This script is a wrapper script that calls zfs-autosnap
+#              for each filesystem provided below.
+
+# Setup some default values
+autosnap="/usr/local/etc/bin/zfs-autosnap"
+logfile="/var/log/zfs-autosnap.log"
+numsnapshots=20
+maxagedays=365
+
+# Auto snapshot every zfs filesystem on the system specified below
+date >> $logfile
+
+# Special filesystems
+$autosnap storage /storage $numsnapshots 15
+$autosnap tank/usr/videos /usr/videos $numsnapshots 15
+
+# Normal filesystems
+$autosnap tank / $numsnapshots $maxagedays 
+$autosnap tank/backup /backup $numsnapshots $maxagedays
+$autosnap tank/usr /usr $numsnapshots $maxagedays
+$autosnap tank/usr/home /usr/home $numsnapshots $maxagedays
+$autosnap tank/usr/local /usr/local $numsnapshots $maxagedays
+$autosnap tank/usr/local/etc /usr/local/etc $numsnapshots $maxagedays
+