test=0
-[ $test == 0 ] && exec >> /var/log/zfs-autosnap.log 2>&1
+[ $test == 0 ] && exec >> /var/log/zfs/zfs-autosnap.log 2>&1
# This script makes the following assumptions/requirements:
# * this script only handles one zfs filesystem, a wrapper should be created
# Setup some default values
autosnap="/usr/local/etc/bin/zfs-autosnap"
-logfile="/var/log/zfs-autosnap.log"
+logfile="/var/log/zfs/zfs-autosnap.log"
numsnapshots=20
maxagedays=365
$duration=adjust_duration($totals{$date}{duration});
$data=adjust_data($totals{$date}{data});
$transfertime=adjust_duration($totals{$date}{transfertime});
- $rate = adjust_data(int($totals{$date}{data}/$totals{$date}{transfertime}));
+ if($totals{$date}{transfertime} > 0) {
+ $rate = adjust_data(int($totals{$date}{data}/$totals{$date}{transfertime}));
+ } else {
+ $rate = 0;
+ }
print "$date: data=${data} transfertime=$transfertime rate=${rate}/sec duration=$duration\n";
}
}
# In test mode (test=1) commands are echoed, not executed
test=0
-[ $test == 0 ] && exec >> /var/log/zfs-replicate.log 2>&1
+[ $test == 0 ] && exec >> /var/log/zfs/zfs-replicate.log 2>&1
# Usage: zfs-backup [filesystem] [destination_pool]
# This script has a limitation with children under a given filesystem.
# Setup some default values
replicate="/usr/local/etc/bin/zfs-replicate"
logfile_parser="/usr/local/etc/bin/zfs-log-parser"
-logfile="/var/log/zfs-replicate.log"
+logfile="/var/log/zfs/zfs-replicate.log"
lockdir="/tmp/zfs-admin-lock"
destpool="backups"
maxsleeptime=60
# This serializes the zfs scrub process for each pool.
maxsleeptime=360
-logfile=/var/log/zfs-scrub.log
+logfile=/var/log/zfs/zfs-scrub.log
for i in tank storage
do
maxsleeptime=360
mailto=root
-logfile=/var/log/zfs-scrub.log
+logfile=/var/log/zfs/zfs-scrub.log
for i in backups
do
#!/bin/bash
snapshot_totals="/usr/local/etc/bin/zfs-snapshot-totals"
-logfile="/var/log/zfs-snapshot-totals.log"
+logfile="/var/log/zfs/zfs-snapshot-totals.log"
date >> $logfile
$snapshot_totals >> $logfile