0275cb56689b2fa0433a2825fbd93fbf5e7619e4

Author
Federico C. Guizzardi <cippinofg@gmail.com>
Committer
Federico C. Guizzardi <cippinofg@gmail.com>
Date

Message

Fixed INCLIST

Diff

 1diff --git a/duplicity-backup.sh b/duplicity-backup.sh
 2index 62e5d46596307558673131d9ec736622a63a2a06..87f1ffbcd0078d4446801076a5ef3e9724aa2a32 100755
 3--- a/duplicity-backup.sh
 4+++ b/duplicity-backup.sh
 5@@ -226,7 +226,6 @@ check_variables ()
 6 {
 7   [[ ${ROOT} = "" ]] && config_sanity_fail "ROOT must be configured"
 8   [[ ${DEST} = "" ]] && config_sanity_fail "DEST must be configured"
 9-  [[ ${INCLIST} = "" ]] && config_sanity_fail "INCLIST must have some value(s) specified"
10   [[ ( ${ENCRYPTION} = "yes" && (${GPG_ENC_KEY} = "foobar_gpg_key" || \
11        ${GPG_SIGN_KEY} = "foobar_gpg_key" || \
12        ${PASSPHRASE} = "foobar_gpg_passphrase")) ]] && \
13@@ -380,8 +379,13 @@ include_exclude()
14     TMP=" --exclude ""'"$exclude"'"
15     EXCLUDE=$EXCLUDE$TMP
16   done
17-
18-  EXCLUDEROOT="--exclude=**"
19+  
20+  # INCLIST is empty so every file needs to be saved
21+  if [[ "$INCLIST" == '' ]]; then
22+    EXCLUDEROOT=''
23+  else
24+    EXCLUDEROOT="--exclude=**"
25+  fi
26 
27   # Restore IFS
28   IFS=$OLDIFS
29@@ -508,6 +512,10 @@ echo -e "--------    START DUPLICITY-BACKUP SCRIPT    --------\n" >> ${LOGFILE}
30 
31 get_lock
32 
33+INCLUDE=
34+EXCLUDE=
35+EXLUDEROOT=
36+
37 case "$COMMAND" in
38   "backup-script")
39     backup_this_script
40@@ -573,9 +581,6 @@ case "$COMMAND" in
41 
42   "restore-file")
43     ROOT=$DEST
44-    INCLUDE=
45-    EXCLUDE=
46-    EXLUDEROOT=
47     OPTION=
48 
49     if [ ! -z "$TIME" ]; then