projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix spelling error
[matthijs/upstream/backupninja.git]
/
src
/
backupninja.in
diff --git
a/src/backupninja.in
b/src/backupninja.in
index 02ffa25b519fc5cd7f860cd580b3c5ca8918169e..1dac55d918e344355931611791d792375c377344 100755
(executable)
--- a/
src/backupninja.in
+++ b/
src/backupninja.in
@@
-178,7
+178,7
@@
function tolower() {
# simple to integer function
function toint() {
# simple to integer function
function toint() {
- echo "$1" | tr -d
[:alpha:]
+ echo "$1" | tr -d
'[:alpha:]'
}
#
}
#
@@
-379,8
+379,8
@@
while [ $# -ge 1 ]; do
singlerun=$2
processnow=1
else
singlerun=$2
processnow=1
else
- echo "--run option must be f
a
llowed by a backupninja action file"
- fatal "--run option must be f
a
llowed by a backupninja action file"
+ echo "--run option must be f
o
llowed by a backupninja action file"
+ fatal "--run option must be f
o
llowed by a backupninja action file"
usage
fi
shift
usage
fi
shift
@@
-433,9
+433,12
@@
setfile $conffile
# get global config options (second param is the default)
getconf configdirectory @CFGDIR@/backup.d
getconf scriptdirectory @datadir@
# get global config options (second param is the default)
getconf configdirectory @CFGDIR@/backup.d
getconf scriptdirectory @datadir@
+getconf reportdirectory
getconf reportemail
getconf reportemail
+getconf reporthost
getconf reportspace
getconf reportsuccess yes
getconf reportspace
getconf reportsuccess yes
+getconf reportuser
getconf reportwarning yes
getconf loglevel 3
getconf when "Everyday at 01:00"
getconf reportwarning yes
getconf loglevel 3
getconf when "Everyday at 01:00"
@@
-445,7
+448,7
@@
getconf usecolors "yes"
getconf SLAPCAT /usr/sbin/slapcat
getconf LDAPSEARCH /usr/bin/ldapsearch
getconf RDIFFBACKUP /usr/bin/rdiff-backup
getconf SLAPCAT /usr/sbin/slapcat
getconf LDAPSEARCH /usr/bin/ldapsearch
getconf RDIFFBACKUP /usr/bin/rdiff-backup
-getconf CSTREAM
=
/usr/bin/cstream
+getconf CSTREAM
/usr/bin/cstream
getconf MYSQLADMIN /usr/bin/mysqladmin
getconf MYSQL /usr/bin/mysql
getconf MYSQLHOTCOPY /usr/bin/mysqlhotcopy
getconf MYSQLADMIN /usr/bin/mysqladmin
getconf MYSQL /usr/bin/mysql
getconf MYSQLHOTCOPY /usr/bin/mysqlhotcopy
@@
-543,10
+546,9
@@
if [ $doit == 1 ]; then
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
if [ "$backuploc" != "$previous" ]; then
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
if [ "$backuploc" != "$previous" ]; then
- mountdev=$(mount | grep "$backuploc" | @AWK@ '{print $1}')
- df -h "$mountdev"
+ df -h "$backuploc"
previous="$backuploc"
previous="$backuploc"
-
fi
+ fi
done
fi
} | mail -s "backupninja: $hostname $subject" $reportemail
done
fi
} | mail -s "backupninja: $hostname $subject" $reportemail
@@
-555,3
+557,8
@@
fi
if [ $actions_run != 0 ]; then
info "FINISHED: $actions_run actions run. $fatals fatal. $errors error. $warnings warning."
fi
if [ $actions_run != 0 ]; then
info "FINISHED: $actions_run actions run. $fatals fatal. $errors error. $warnings warning."
fi
+
+if [ -n "$reporthost" ]; then
+ debug "send $logfile to $reportuser@$reporthost:$reportdirectory"
+ rsync -qt $logfile $reportuser@$reporthost:$reportdirectory
+fi