Diff
1diff --git a/dt-s3-backup.sh b/dt-s3-backup.sh
2index a2e5ed151347188819e82e4a1d59911a5335435b..e5a3eb6ceed7a217e74ae2856dc3aa4a8282e370 100755
3--- a/dt-s3-backup.sh
4+++ b/dt-s3-backup.sh
5@@ -100,8 +100,13 @@ LOG_FILE="duplicity-`date +%Y-%m-%d-%M`.txt"
6 LOG_FILE_OWNER="foobar_user_name:foobar_user_name"
7 VERBOSITY="-v3"
8
9-# END OF USER EDITS
10-
11+# TROUBLESHOOTING: If you are having any problems running this script it is
12+# helpful to see the command output that is being generated to determine if the
13+# script is causing a problem or if it is an issue with duplicity (or your
14+# setup). Simply uncomment the ECHO line below and the commands will be
15+# printed to the logfile. This way, you can see if the problem is with the
16+# script or with duplicity.
17+#ECHO=$(which echo)
18
19 ##############################################################
20 # Script Happens Below This Line - Shouldn't Require Editing #
21@@ -198,7 +203,7 @@ include_exclude()
22 duplicity_cleanup()
23 {
24 echo "-----------[ Duplicity Cleanup ]-----------" >> ${LOGFILE}
25- ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} --force \
26+ ${ECHO} ${DUPLICITY} ${CLEAN_UP_TYPE} ${CLEAN_UP_VARIABLE} --force \
27 --encrypt-key=${GPG_KEY} \
28 --sign-key=${GPG_KEY} \
29 ${DEST} >> ${LOGFILE}
30@@ -207,7 +212,7 @@ duplicity_cleanup()
31
32 duplicity_backup()
33 {
34- ${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
35+ ${ECHO} ${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
36 --encrypt-key=${GPG_KEY} \
37 --sign-key=${GPG_KEY} \
38 ${EXCLUDE} \
39@@ -413,9 +418,12 @@ fi
40
41 echo -e "-------- END DT-S3-BACKUP SCRIPT --------\n" >> ${LOGFILE}
42
43+if [ ${ECHO} ]; then
44+ echo "TEST RUN ONLY: Check the logfile for command output."
45+fi
46+
47 unset AWS_ACCESS_KEY_ID
48 unset AWS_SECRET_ACCESS_KEY
49 unset PASSPHRASE
50
51 # vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent:
52-# EOF