projects
/
matthijs
/
upstream
/
backupninja-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@119 758a04ac-41e6-0310...
[matthijs/upstream/backupninja-vserver.git]
/
handlers
/
rdiff
diff --git
a/handlers/rdiff
b/handlers/rdiff
index 61eb7f5c7e05d5af6cfa82ae3303909269779f46..ca97fa4da760d51447617236d0a713623d6b0ed4 100644
(file)
--- a/
handlers/rdiff
+++ b/
handlers/rdiff
@@
-12,6
+12,7
@@
getconf type; sourcetype=$type
getconf label
getconf keep 60
getconf include
getconf label
getconf keep 60
getconf include
+getconf vsinclude
getconf exclude
### DESTINATION ###
getconf exclude
### DESTINATION ###
@@
-24,6
+25,18
@@
getconf type; desttype=$type
getconf user; destuser=$user
getconf host; desthost=$host
getconf user; destuser=$user
getconf host; desthost=$host
+# See if vservers are configured
+if [ "$VSERVERS" = "yes" ]
+then
+ if [ ! -d $VROOTDIR ]
+ then
+ fatal "vservers enabled, but $VROOTDIR does not exist!"
+ else
+ info "vserver method enabled"
+ usevserver=1
+ fi
+fi
+
[ "$destdir" != "" ] || fatal "Destination directory not set"
if [ "$desttype" == "remote" ]; then
[ "$destdir" != "" ] || fatal "Destination directory not set"
if [ "$desttype" == "remote" ]; then
@@
-54,7
+67,8
@@
fi
[ "$label" != "" ] || fatal "Source missing label"
[ "$sourcetype" == "local" ] || fatal "Only local source type supported"
[ "$label" != "" ] || fatal "Source missing label"
[ "$sourcetype" == "local" ] || fatal "Only local source type supported"
-[ "$include" != "" ] || fatal "No source includes specified"
+[ "$include" != "" -o "$vsinclude" != "" ] || fatal "No source includes specified"
+#TODO should I test for vsinclude if usevservers=1?
execstr_clientpart="/"
execstr_clientpart="/"
@@
-101,6
+115,19
@@
for i in $include; do
execstr="${execstr}--include '$str' "
done
execstr="${execstr}--include '$str' "
done
+# vsinclude
+if [ $usevserver ]
+then
+ for vserver in `ls $VROOTDIR|grep -v lost+found`
+ do
+ for vi in $vsinclude
+ do
+ str="${vi//__star__/*}"
+ execstr="${execstr}--include '$VROOTDIR/$vserver$str' "
+ done
+ done
+fi
+
# exclude everything else
execstr="${execstr}--exclude '/*' "
# exclude everything else
execstr="${execstr}--exclude '/*' "