X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fdup;h=8d38cfc5996f212a5b1840de7e939ac3c31966a3;hb=85a7eb350aa10565a9c1c72fd3a3a98d8d2a7504;hp=22f915f53306f45a78765b447ad77f4faa893005;hpb=bfe530dc59b9cec4a0cbdfdaafb5addb0e4484b2;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/dup b/handlers/dup index 22f915f..8d38cfc 100644 --- a/handlers/dup +++ b/handlers/dup @@ -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="/" @@ -131,17 +136,17 @@ execstr=${execstr//\\*/\\\\\\*} debug "duplicity $execstr --exclude '**' / $execstr_serverpart" if [ ! $test ]; then + export PASSPHRASE=$password output=`nice -n $nicelevel \ su -c \ - "export PASSPHRASE=$password \ - && duplicity $execstr --exclude '**' / $execstr_serverpart 2>&1"` + "duplicity $execstr --exclude '**' / $execstr_serverpart 2>&1"` code=$? - if [ "$code" == "0" ]; then + if [ $code -eq 0 ]; then debug $output info "Duplicity finished successfully." else - warning $output - warning "Duplicity failed." + debug $output + fatal "Duplicity failed." fi fi