dup: Fixed globbing support in include and exclude options (Debian bug #338796)
[matthijs/upstream/backupninja.git] / handlers / dup
index 176ac3eae8e5c3066371d07fd4a2086d42b5e9e2..79be2fc61fd5f13c078c746fbdd3b63ef43fb4cb 100644 (file)
@@ -19,6 +19,7 @@ getconf vsinclude
 getconf exclude
 
 setsection dest
+getconf incremental yes
 getconf keep 60
 getconf sshoptions
 getconf bandwidthlimit 0
@@ -92,6 +93,10 @@ if [ "$keep" != "yes" ]; then
     execstr="${execstr}--remove-older-than $keep "
 fi
 
+if [ "$incremental" == "no" ]; then
+    execstr="${execstr}--full "
+fi
+
 execstr_serverpart="scp://$destuser@$desthost/$destdir"
 execstr_clientpart="/"
 
@@ -100,13 +105,13 @@ execstr_clientpart="/"
 # excludes
 for i in $exclude; do
        str="${i//__star__/*}"
-       execstr="${execstr}--exclude $str "
+       execstr="${execstr}--exclude '$str' "
 done
        
 # includes 
 for i in $include; do
        str="${i//__star__/*}"
-       execstr="${execstr}--include $str "
+       execstr="${execstr}--include '$str' "
 done
 
 # vsincludes