Close issues #18 and #20 : `which s3cmd` only called when dest is s3 and hint in the comments of the config file to use --s3-european-buckets option for european buckets
Diff
1diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example
2index 503729216d570fe4420c47d2b804af8019c5b5ce..964793aaa310a7159f35e4bee948620791256f5a 100644
3--- a/duplicity-backup.conf.example
4+++ b/duplicity-backup.conf.example
5@@ -116,9 +116,11 @@ EXCLIST=( "/home/*/Trash" \
6 7 # STATIC BACKUP OPTIONS
8 # Here you can define the static backup options that you want to run with
9-# duplicity. I use both the `--full-if-older-than` option plus the
10-# `--s3-use-new-style` option (for European buckets). Be sure to separate your
11-# options with appropriate spacing.
12+# duplicity. Reference is the manpage of duplicity (available at
13+# http://duplicity.nongnu.org/duplicity.1.html for example)
14+# Useful examples are `--full-if-older-than` option and (for those using
15+# Amazon S3 in Europe) `--s3-use-new-style` and `--s3-european-buckets` options
16+# Be sure to separate your options with appropriate spacing.
17 STATIC_OPTIONS="--full-if-older-than 14D --s3-use-new-style"
1819 # FULL BACKUP & REMOVE OLDER THAN SETTINGS
20diff --git a/duplicity-backup.sh b/duplicity-backup.sh
21index b48eb424f81298196f5d6478c80b3f502f204832..15ae4c6465d5c658f29b5c44b58e1cc625cd45e2 100755
22--- a/duplicity-backup.sh
23+++ b/duplicity-backup.sh
24@@ -153,7 +153,6 @@ export SIGN_PASSPHRASE
2526 LOGFILE="${LOGDIR}${LOG_FILE}"
27 DUPLICITY="$(which duplicity)"
28-S3CMD="$(which s3cmd)"
2930 # File to use as a lock. The lock is used to insure that only one instance of
31 # the script is running at a time.
32@@ -184,6 +183,7 @@ fi
3334 if [ "`echo ${DEST} | cut -c 1,2`" = "s3" ]; then
35 DEST_IS_S3=true
36+ S3CMD="$(which s3cmd)"
37 if [ ! -x "$S3CMD" ]; then
38 echo $NO_S3CMD; S3CMD_AVAIL=false
39 elif [ ! -f "${HOME}/.s3cfg" ]; then