X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fdup.in;h=9c6a4937a5e06afc2d04d2b0affc249860352292;hp=0f4e58e0a65fa466ca297a297fc68766a5583b34;hb=0a6abfc3cef116a69c7a4c8a820a08406432b46f;hpb=c18c24b4e2aebf5328a3b4adc03895f6a5dffe04 diff --git a/handlers/dup.in b/handlers/dup.in index 0f4e58e..9c6a493 100644 --- 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." -[ -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 @@ -166,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)." + chmod 0700 "$tmpdir" fi info "Using $tmpdir as TMPDIR" precmd="${precmd}TMPDIR=$tmpdir " @@ -220,12 +221,12 @@ execstr_source=${execstr_source//\\*/\\\\\\*} # 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 \ - "$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 @@ -240,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 - 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 \ - "$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