50a833fe54c34536c78c112955dd37d8095bc177

Author
Mario Santagiuliana <mario@marionline.it>
Committer
Mario Santagiuliana <mario@marionline.it>
Date

Message

Add --list-current-files option

Diff

 1diff --git a/CHANGELOG b/CHANGELOG
 2index 3700a2b105cc250c8a76170447f8739c955f0f2b..dd1fbe5aa25d5037665d32537b0ee689d53e26d4 100644
 3--- a/CHANGELOG
 4+++ b/CHANGELOG
 5@@ -1,3 +1,6 @@
 6+Version Four (marionline)
 7+	* Add --list-current-files to view in the standart-output files stored in my archive
 8+
 9 Version Four (0.4)
10 
11 	* Moved the source code to github
12diff --git a/README b/README
13index faf6e7b450c3f79e56613ba40adad86167a74665..3e70f159d4c52ea9952417dcf9a17a43735cbd73 100644
14--- a/README
15+++ b/README
16@@ -7,4 +7,4 @@ TO DO:
17 * Add a README file to the "--backup-this-script" option because, if you are like me, when it is working for so long I forget what to do when it comes time to restore
18 * Clean up general formatting of the script and make it pretty 
19 * give demo on how to use an "--archive-dir" option
20-* test --restore-file (specific) option
21+* test --restore-file (specific) option <--- marionline --- seem to work fine for me
22diff --git a/dt-s3-backup.sh b/dt-s3-backup.sh
23index dec6de524e601fbd3b2d537ea4228221fb88cd9b..b1f56adf188fa18c935cfd5805cd672230611f32 100755
24--- a/dt-s3-backup.sh
25+++ b/dt-s3-backup.sh
26@@ -396,6 +396,15 @@ elif [ "$1" = "--restore-file" ]; then
27   DEST=$FILE_TO_RESTORE
28   duplicity_backup
29 
30+elif [ "$1" = "--list-current-files" ]; then
31+  check_variables
32+  OPTION="list-current-files"
33+  ${DUPLICITY} ${OPTION} ${VERBOSITY} ${STATIC_OPTIONS} \
34+  --encrypt-key=${GPG_KEY} \
35+  --sign-key=${GPG_KEY} \
36+  ${DEST}
37+	echo -e "--------    END    --------\n" >> ${LOGFILE}
38+
39 elif [ "$1" = "--backup" ]; then
40   check_variables
41   include_exclude
42@@ -413,7 +422,8 @@ else
43 
44     --verify: verifies the backup (no cleanup is run)
45     --restore [path]: restores the backup to specified path
46-    --restore-file [file]: restore a specific file
47+    --restore-file [file]: restore a specific files
48+    --list-current-files: lists  the  files  currently backed up in the archive.
49 
50     --backup-script: let's you backup the script and secret key to the current working directory
51