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
fix location of deleted_on file and add missing destid_file options in maildir handler
[matthijs/upstream/backupninja-vserver.git]
/
handlers
/
dup.in
diff --git
a/handlers/dup.in
b/handlers/dup.in
index cae99097e814b764cacdb20d3ebfa6acb5fa2f46..9c6a4937a5e06afc2d04d2b0affc249860352292 100644
(file)
--- a/
handlers/dup.in
+++ b/
handlers/dup.in
@@
-35,7
+35,7
@@
destdir=${destdir%/}
### SANITY CHECKS ##############################################################
[ -n "$desturl" -o -n "$destdir" ] || fatal "The destination directory (destdir) must be set when desturl is not used."
### SANITY CHECKS ##############################################################
[ -n "$desturl" -o -n "$destdir" ] || fatal "The destination directory (destdir) must be set when desturl is not used."
-[ -n "$include" ] || fatal "No source includes specified"
+[ -n "$include"
-o -n "$vsinclude"
] || fatal "No source includes specified"
[ -n "$password" ] || fatal "The password option must be set."
### VServers
[ -n "$password" ] || fatal "The password option must be set."
### VServers
@@
-105,7
+105,10
@@
duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`"
# --sftp-command ourselves
scpoptions="$sshoptions"
# --sftp-command ourselves
scpoptions="$sshoptions"
-[ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit"
+if [ "$bandwidthlimit" =! 0 ]; then
+ [ -z "$testurl" ] || warning 'The bandwidthlimit option is not used when desturl is set.'
+ scpoptions="$scpoptions -l $bandwidthlimit"
+fi
# < 0.4.2 : only uses ssh and scp
if [ "$duplicity_major" -le 0 -a "$duplicity_minor" -le 4 -a "$duplicity_sub" -lt 2 ]; then
# < 0.4.2 : only uses ssh and scp
if [ "$duplicity_major" -le 0 -a "$duplicity_minor" -le 4 -a "$duplicity_sub" -lt 2 ]; then
@@
-163,6
+166,7
@@
if [ -n "$tmpdir" ]; then
info "Temporary directory ($tmpdir) does not exist, creating it."
mkdir -p "$tmpdir"
[ $? -eq 0 ] || fatal "Could not create temporary directory ($tmpdir)."
info "Temporary directory ($tmpdir) does not exist, creating it."
mkdir -p "$tmpdir"
[ $? -eq 0 ] || fatal "Could not create temporary directory ($tmpdir)."
+ chmod 0700 "$tmpdir"
fi
info "Using $tmpdir as TMPDIR"
precmd="${precmd}TMPDIR=$tmpdir "
fi
info "Using $tmpdir as TMPDIR"
precmd="${precmd}TMPDIR=$tmpdir "
@@
-217,12
+221,12
@@
execstr_source=${execstr_source//\\*/\\\\\\*}
# cleanup
if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then
# cleanup
if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then
- debug "$precmd duplicity cleanup $execstr_options $execstr_serverpart"
+ debug "$precmd duplicity cleanup
--force
$execstr_options $execstr_serverpart"
if [ ! $test ]; then
export PASSPHRASE=$password
output=`nice -n $nicelevel \
su -c \
if [ ! $test ]; then
export PASSPHRASE=$password
output=`nice -n $nicelevel \
su -c \
- "$precmd duplicity cleanup $execstr_options $execstr_serverpart 2>&1"`
+ "$precmd duplicity cleanup
--force
$execstr_options $execstr_serverpart 2>&1"`
exit_code=$?
if [ $exit_code -eq 0 ]; then
debug $output
exit_code=$?
if [ $exit_code -eq 0 ]; then
debug $output
@@
-237,12
+241,12
@@
fi
# remove-older-than
if [ "$keep" != "yes" ]; then
if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then
# remove-older-than
if [ "$keep" != "yes" ]; then
if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 4 ]; then
- debug "$precmd duplicity remove-older-than $keep $execstr_options $execstr_serverpart"
+ debug "$precmd duplicity remove-older-than $keep
--force
$execstr_options $execstr_serverpart"
if [ ! $test ]; then
export PASSPHRASE=$password
output=`nice -n $nicelevel \
su -c \
if [ ! $test ]; then
export PASSPHRASE=$password
output=`nice -n $nicelevel \
su -c \
- "$precmd duplicity remove-older-than $keep $execstr_options $execstr_serverpart 2>&1"`
+ "$precmd duplicity remove-older-than $keep
--force
$execstr_options $execstr_serverpart 2>&1"`
exit_code=$?
if [ $exit_code -eq 0 ]; then
debug $output
exit_code=$?
if [ $exit_code -eq 0 ]; then
debug $output