projects
/
zfs-ubuntu
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed accidentally added local configuration file from repo
[zfs-ubuntu/.git]
/
zfs-replicate-wrapper
diff --git
a/zfs-replicate-wrapper
b/zfs-replicate-wrapper
index a43e8fb75204542978af8ca62bdf00e0d679e36e..c6c3369e5eec98211424805191b6091bc18f2a42 100755
(executable)
--- a/
zfs-replicate-wrapper
+++ b/
zfs-replicate-wrapper
@@
-4,27
+4,16
@@
# Description: This script calls zfs-replicate for each filesystem needing
# to be backed up, or replicated, to another ZFS pool.
# Description: This script calls zfs-replicate for each filesystem needing
# to be backed up, or replicated, to another ZFS pool.
+# source our configuration
+config="${0%/*}/zfs-scripts.conf"
+[ -e "${config}.dist" ] && . ${config}.dist
+[ -e "${config}" ] && . ${config}
+
# Setup some default values
# Setup some default values
-zfsreplicate="/etc/bin/zfs-replicate"
-logdir="/var/log/zfs"
-logfile_parser="/etc/bin/zfs-log-parser"
logfile="$logdir/zfs-replicate.log"
mylogfile="$logdir/zfs-replicate-all.log"
logfile="$logdir/zfs-replicate.log"
mylogfile="$logdir/zfs-replicate-all.log"
-remote="tank.pippins.net"
-local_pool=backups
-mailto=root@pippins.net
date=`date`
starttime=`date +%s`
date=`date`
starttime=`date +%s`
-zfs=/usr/sbin/zfs
-
-# Specify the list of filesystems to replicate
-filesystems_to_replicate='
-naspool/www
-naspool/git
-'
-
-# Specify the maximum run time in minutes that this script can run (0=no limit)
-maxruntime=240
# This function checks to see if our runtime has exceeded our stoptime
timeexceeded() {
# This function checks to see if our runtime has exceeded our stoptime
timeexceeded() {
@@
-52,7
+41,7
@@
trap cleanup_and_exit INT
# This function executes the replicate command and checks the stoptime
replicate() {
# This function executes the replicate command and checks the stoptime
replicate() {
-
$zfs
replicate $* >> $logfile 2>&1
+
zfs-
replicate $* >> $logfile 2>&1
timeexceeded
if [ $? == 1 ]; then
cleanup_and_exit
timeexceeded
if [ $? == 1 ]; then
cleanup_and_exit
@@
-113,6
+102,6
@@
echo `date` ZFS replicate complete >> $logfile
echo `data` ZFS replicate complete | tee -a $mylogfile
# Parse the log file and extract our backup stats
echo `data` ZFS replicate complete | tee -a $mylogfile
# Parse the log file and extract our backup stats
-
$logfile_
parser "$logfile" "$date" >> $logfile
-
$logfile_
parser "$logfile" "$date" | tee -a $mylogfile
+
zfs-log-
parser "$logfile" "$date" >> $logfile
+
zfs-log-
parser "$logfile" "$date" | tee -a $mylogfile