02015c89d54b9be7b03904d531ac7fb058305353

Author
zertrin <zertrin@gmail.com>
Committer
zertrin <zertrin@gmail.com>
Date

Message

Merge branch 'joubertredrat-ftp-password'

Diff

 1diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example
 2index a467cc05a919cabf622b0ce9b04a9ae9dad003ad..f90f126a0136a834fb68a40e45028defba7792cb 100644
 3--- a/duplicity-backup.conf.example
 4+++ b/duplicity-backup.conf.example
 5@@ -104,6 +104,16 @@ DEST="s3+http://backup-bucket/backup-folder/"
 6 #DEST="ssh://user[:password]@other.host[:port]/[/]some_dir"
 7 #DEST="file:///home/foobar_user_name/new-backup-test/"
 8 
 9+# DESTINATION BACKEND PASSWORD
10+# Instead of setting the password needed for the backup destination in the
11+# DEST url, you can supply it in the FTP_PASSWORD variable below, which is
12+# used by most, if not all backends, regardless of it’s name.
13+# Duplicity's official documentation states:
14+#   "Supported by most backends which are password capable. More secure than
15+#    setting it in the backend url (which might be readable in the operating
16+#    systems process listing to other users on the same machine)."
17+#FTP_PASSWORD="password"
18+
19 # INCLUDE LIST OF DIRECTORIES
20 # Here is a list of directories to include; if you want to include
21 # everything that is in root, you could leave this list empty (I think).
22diff --git a/duplicity-backup.sh b/duplicity-backup.sh
23index c926c1b71ba75419591b425a4eb8864549480932..62e5d46596307558673131d9ec736622a63a2a06 100755
24--- a/duplicity-backup.sh
25+++ b/duplicity-backup.sh
26@@ -159,6 +159,9 @@ export AWS_ACCESS_KEY_ID
27 export AWS_SECRET_ACCESS_KEY
28 export PASSPHRASE
29 export SIGN_PASSPHRASE
30+if [[ -n "$FTP_PASSWORD" ]]; then
31+  export FTP_PASSWORD
32+fi
33 
34 LOGFILE="${LOGDIR}${LOG_FILE}"
35 DUPLICITY="$(which duplicity)"