diff --git a/.env.sample b/.env.sample index 58db1d05cce0c0f879b9c41fbbda914e7c3877ec..b32055cc3218a5e81b529b1a22b30da09b87040c 100644 --- a/.env.sample +++ b/.env.sample @@ -9,6 +9,7 @@ verbosity="info" # Set an arcihve directory, subdir of /root/.cache/duplicity archive_dir="" log_file=/var/log/bckp.log +timeout=60 BK_FULL_FREQ="3W" # create a new full backup every... diff --git a/backup.sh b/backup.sh index 060f44787a587fab17e33e19f7aa8b812de6c60d..3fbbd133f621198cb883334815d896b005b864f4 100755 --- a/backup.sh +++ b/backup.sh @@ -46,6 +46,7 @@ backup(){ export FTP_PASSWORD="$ftppass" set -x /usr/bin/duplicity --verbosity $verbosity \ + --timeout $timeout \ --full-if-older-than $BK_FULL_FREQ \ --include ${bckplist// / --include } \ --exclude /root/.cache/duplicity/ \ diff --git a/inc.sh b/inc.sh index b036d2cd577ab1749bc2de86df0c47558a2731f8..9d40257b644ac867adc1f88fb8d3f52066ea4a54 100755 --- a/inc.sh +++ b/inc.sh @@ -20,6 +20,10 @@ if [ -z "$verbosity" ]; then verbosity="notice" fi +if [ -z "$timeout" ]; then + timeout=60 +fi + remote="ftp://$user@$host/$remotedir/" # Exit the script and sendmail @@ -53,6 +57,7 @@ run_duplicity(){ export FTP_PASSWORD="$ftppass" set -x /usr/bin/duplicity --verbosity $verbosity \ + --timeout $timeout \ $@ \ $remote set +x