diff --git a/backup.sh b/backup.sh index 74337089d66e9a49dbdd7f6ec6aca2c0d7fd84bd..d740992620eb5a62f116470faf5bb8c0348d7f79 100755 --- a/backup.sh +++ b/backup.sh @@ -36,11 +36,20 @@ backup(){ pre_actions exit_on_fail $? "Pre_action failed" echo "Creating encrypted incremental backup: $bckplist " - run_duplicity --full-if-older-than $BK_FULL_FREQ \ + export PASSPHRASE="$encpass" + export FTP_PASSWORD="$ftppass" + set -x + /usr/bin/duplicity --verbosity $verbosity \ + --full-if-older-than $BK_FULL_FREQ \ --include ${bckplist// / --include } \ --exclude /root/.cache/duplicity/ \ - / + --exclude '**' \ + / \ + $remote ret=$? + set +x + unset PASSPHRASE + unset FTP_PASSWORD if [ -z "$retries" ] then retrie_on_fail $ret "Duplicity failed"