Make logdir if it doesn't exist
[zfs-ubuntu/.git] / zfs-scripts.conf.dist
index 42f387d9dacea22023df146439f49b38dbe57b62..019ae870353bcf9fbc442d316ce974e2df75c28f 100644 (file)
@@ -1,46 +1,61 @@
 ###########################################################################
-# This is a shell config script included by the other ZFS scripts.
-# You must copy this file and modify these values to match your system.
-# Save the resulting file as "zfs-scripts.conf" in this directory.
-# This will prevent your settings from being overwritten by future updates.
+# local configuration file for ZFS scripts
 ###########################################################################
 
 # setup your path here to find all the binaries the ZFS scripts call
 PATH=/usr/sbin:/sbin:/etc/bin:.:$PATH
 
+# set our hostname
+hostname=`hostname`
+
 # specify the path to the zfs binary
-zfs=/usr/sbin/zfs
+zfs=/sbin/zfs
 
 # specify the path to your command line mailer
 mailx=/usr/bin/mailx
 
 # specify the path to the logdir the ZFS scripts should dump their logs to
 logdir="/var/log/zfs"
+[[ ! -d "$logdir" ]] && mkdir "$logdir"
 
 # specify the name of the lockdir used when performing ZFS admin operations
 lockdir="/tmp/zfs-admin-lock"
 
 # specify the user to send email reports to
-mailto=
+mailto="user@domain"
+
+# specifu the ssh command and any options needed for accessing a remote server
+ssh="ssh"
 
-# specify the name of the remote server to pull snapshots from to backup locally
+# specify the fqdn of the remote server to pull snapshots from to backup locally
+# specify "localhost" if the remote server is the local machine
 remote=
 
-# specify the name of the local pool to store remotely pulled (backup) snapshots to
-local_pool=
+# specify the name of the local pool to store the $remote's snapshots into
+backup_pool=
+
+# import backup pool before replication and export backup pool after replication
+import_export_backup_pool=0
 
 # when this variable is set, local filesystems will be destroyed
 # before receiving a full streams into them from the remote source.
+# if it needs to do this, and this option is set to 0, it aborts.
 destroy_local_filesystem_on_full_replicate=0
 
 # set this to 1 if you want the snapshot script to run in "test" mode (not really take any snaps)
+# leave blank if not under test
 SNAP_UNDER_TEST=
 
 # Specify the maximum run time in minutes that the replicate script can run for (0=no limit)
 maxruntime=0
 
-# Specify the list of filesystems to replicate from the remote to the local_pool (1 per line)
-# (enter 1 filesystem per line)
-filesystems_to_replicate='
-'
+# Setup throttling related parameters that will rate limit the zfs send | zfs receive pipe
+# The maximum limit a local backup can handle to avoid excessive CPU load is 10MB/s
+throttle_enable=0
+throttle_opt="-v -M 10"
+
+# Specify the list of filesystems to replicate from the $remote to the $backup_pool (1 per line)
+# The format of each line should be: pool/filesystem
+filesystems_to_replicate="
+"