projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a framework for source host backends.
[matthijs/upstream/backupninja.git]
/
src
/
backupninja.in
diff --git
a/src/backupninja.in
b/src/backupninja.in
index 34021b56ec4350e811e73762e127bc5fa9fc2a98..167ee7a9e57ef5ec9329449ef36f2838f7aaba1f 100755
(executable)
--- a/
src/backupninja.in
+++ b/
src/backupninja.in
@@
-381,7
+381,7
@@
loglevel=3
while [ $# -ge 1 ]; do
case $1 in
-h|--help) usage;;
while [ $# -ge 1 ]; do
case $1 in
-h|--help) usage;;
- -d|--debug) debug=1;;
+ -d|--debug) debug=1;
export BACKUPNINJA_DEBUG=yes;
;
-t|--test) test=1;debug=1;;
-n|--now) processnow=1;;
-f|--conffile)
-t|--test) test=1;debug=1;;
-n|--now) processnow=1;;
-f|--conffile)
@@
-448,6
+448,8
@@
fi
# include shared functions
. $libdirectory/tools
# include shared functions
. $libdirectory/tools
+. $libdirectory/array
+. $libdirectory/backend
. $libdirectory/vserver
setfile $conffile
. $libdirectory/vserver
setfile $conffile
@@
-468,6
+470,7
@@
getconf when "Everyday at 01:00"
defaultwhen=$when
getconf logfile @localstatedir@/log/backupninja.log
getconf usecolors "yes"
defaultwhen=$when
getconf logfile @localstatedir@/log/backupninja.log
getconf usecolors "yes"
+getconf default_backend
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
@@
-483,7
+486,9
@@
getconf GZIP /bin/gzip
getconf RSYNC /usr/bin/rsync
getconf admingroup root
getconf RSYNC /usr/bin/rsync
getconf admingroup root
-# initialize vservers support
+init_backends
+
+# initialize legacy vservers support
# (get config variables and check real vservers availability)
init_vservers nodialog
# (get config variables and check real vservers availability)
init_vservers nodialog
@@
-570,7
+575,7
@@
if [ $doit == 1 ]; then
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
previous=""
for i in $(ls "$configdirectory"); do
backuploc=$(grep ^directory "$configdirectory"/"$i" | @AWK@ '{print $3}')
- if [ "$backuploc" != "$previous" -a -n "$backuploc" ]; then
+ if [ "$backuploc" != "$previous" -a -n "$backuploc"
-a -d "$backuploc"
]; then
df -h "$backuploc"
previous="$backuploc"
fi
df -h "$backuploc"
previous="$backuploc"
fi