diff options
-rw-r--r-- | handlers/dup.in | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/handlers/dup.in b/handlers/dup.in index b358406..6fbb27a 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -95,6 +95,7 @@ fi ### COMMAND-LINE MANGLING ###################################################### ### initialize $execstr* +execstr_precmd= execstr_command= execstr_options="$options --no-print-statistics" execstr_source= @@ -261,13 +262,13 @@ fi ### Cleanup commands (duplicity >= 0.4.4) # cleanup -debug "duplicity cleanup --force $execstr_options $execstr_serverpart" +debug "$execstr_precmd duplicity cleanup --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ - "duplicity cleanup --force $execstr_options $execstr_serverpart 2>&1"` + "$execstr_precmd duplicity cleanup --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then debug $output @@ -280,13 +281,13 @@ fi # remove-older-than if [ "$keep" != "yes" ]; then - debug "duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart" + debug "$execstr_precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ - "duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart 2>&1"` + "$execstr_precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then debug $output @@ -302,13 +303,13 @@ fi if [ "$keep" != "yes" ]; then if [ "$keepincroffulls" != "all" ]; then if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 10 ]; then - debug "$precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart" + debug "$execstr_precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart" if [ ! $test ]; then export PASSPHRASE=$password export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ - "$precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart 2>&1"` + "$execstr_precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart 2>&1"` exit_code=$? if [ $exit_code -eq 0 ]; then debug $output @@ -323,14 +324,14 @@ if [ "$keep" != "yes" ]; then fi ### Backup command -debug "duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart" +debug "$execstr_precmd duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart" if [ ! $test ]; then outputfile=`maketemp backupout` export PASSPHRASE=$password export FTP_PASSWORD=$ftp_password output=`nice -n $nicelevel \ su -c \ - "duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart >$outputfile 2>&1"` + "$execstr_precmd duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart >$outputfile 2>&1"` exit_code=$? debug $output cat $outputfile | (while read output ; do |