projects
/
matthijs
/
upstream
/
backupninja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r198@um: micah | 2005-12-24 22:15:35 -0500
[matthijs/upstream/backupninja.git]
/
handlers
/
dup
diff --git
a/handlers/dup
b/handlers/dup
index 22f915f53306f45a78765b447ad77f4faa893005..79be2fc61fd5f13c078c746fbdd3b63ef43fb4cb 100644
(file)
--- a/
handlers/dup
+++ b/
handlers/dup
@@
-19,6
+19,7
@@
getconf vsinclude
getconf exclude
setsection dest
getconf exclude
setsection dest
+getconf incremental yes
getconf keep 60
getconf sshoptions
getconf bandwidthlimit 0
getconf keep 60
getconf sshoptions
getconf bandwidthlimit 0
@@
-92,6
+93,10
@@
if [ "$keep" != "yes" ]; then
execstr="${execstr}--remove-older-than $keep "
fi
execstr="${execstr}--remove-older-than $keep "
fi
+if [ "$incremental" == "no" ]; then
+ execstr="${execstr}--full "
+fi
+
execstr_serverpart="scp://$destuser@$desthost/$destdir"
execstr_clientpart="/"
execstr_serverpart="scp://$destuser@$desthost/$destdir"
execstr_clientpart="/"
@@
-100,13
+105,13
@@
execstr_clientpart="/"
# excludes
for i in $exclude; do
str="${i//__star__/*}"
# 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__/*}"
done
# includes
for i in $include; do
str="${i//__star__/*}"
- execstr="${execstr}--include
$str
"
+ execstr="${execstr}--include
'$str'
"
done
# vsincludes
done
# vsincludes
@@
-131,17
+136,17
@@
execstr=${execstr//\\*/\\\\\\*}
debug "duplicity $execstr --exclude '**' / $execstr_serverpart"
if [ ! $test ]; then
debug "duplicity $execstr --exclude '**' / $execstr_serverpart"
if [ ! $test ]; then
+ export PASSPHRASE=$password
output=`nice -n $nicelevel \
su -c \
output=`nice -n $nicelevel \
su -c \
- "export PASSPHRASE=$password \
- && duplicity $execstr --exclude '**' / $execstr_serverpart 2>&1"`
+ "duplicity $execstr --exclude '**' / $execstr_serverpart 2>&1"`
code=$?
code=$?
- if [
"$code" == "0"
]; then
+ if [
$code -eq 0
]; then
debug $output
info "Duplicity finished successfully."
else
debug $output
info "Duplicity finished successfully."
else
-
warnin
g $output
-
warning
"Duplicity failed."
+
debu
g $output
+
fatal
"Duplicity failed."
fi
fi
fi
fi