a843a4f3a58c476252985ab62a1166d03973249d

Author
Damon Timm <damontimm@gmail.com>
Committer
Damon Timm <damontimm@gmail.com>
Date

Message

added a new TODO regarding --restore-file (to working directory if no other directory is specified)

Diff

 1diff --git a/README b/README
 2index 4d77abb6944c8a76d64ffc548f1b6952788a8ff0..854ba16a7457b88124ea3e2c8dad060ce7b15ca5 100644
 3--- a/README
 4+++ b/README
 5@@ -5,10 +5,9 @@ More information about this script avaiable at: http://damontimm.com/code/dt-s3-
 6 ==TO DO==
 7 
 8 * 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
 9-* Clean up general formatting of the script and make it pretty 
10-* give demo on how to use an "--archive-dir" option
11-* test --restore-file (specific) option <--- marionline --- seem to work fine for me, test with little archive
12 * Add --restore-dir option
13+* --restore-file restores to the *original* location if not alternate location is specified ... may make more sense to have it restore the current working directory first.
14+* add option to be able to restore a file from a specific time period (not just the latest version)
15 
16 === USAGE EXAMPLE ===
17 You must configure the script before using it you can config it with your favorites test editor(read comments in script).
18diff --git a/dt-s3-backup.sh b/dt-s3-backup.sh
19index 44e1bfdda54c32fd6a3bec2b95f529eeb018a7b5..2f226bbce5619feca4a17e4b3f00c522b2b462eb 100755
20--- a/dt-s3-backup.sh
21+++ b/dt-s3-backup.sh
22@@ -1,5 +1,4 @@
23 #!/bin/bash  
24-# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent: 
25 # 
26 # Copyright (c) 2008-2010 Damon Timm.  
27 # Copyright (c) 2010 Mario Santagiuliana.
28@@ -346,7 +345,7 @@ elif [ "$1" = "--restore" ]; then
29   OPTION="restore"
30 
31   if [[ ! "$2" ]]; then
32-    echo "Please provide a destination path (/home/user/restore-dir):"
33+    echo "Please provide a destination path (eg, /home/user/dir):"
34     read -e NEWDESTINATION
35     DEST=$NEWDESTINATION
36 		echo ">> You will restore from ${ROOT} to ${DEST}"
37@@ -398,7 +397,10 @@ elif [ "$1" = "--restore-file" ]; then
38 		if [[ "$3" ]]; then
39 			DEST=$3
40 		else
41-			DEST=$FILE_TO_RESTORE
42+      # TODO - this restores it to the original location, I think would be
43+      # better if we restored it to the current working directory if no file
44+      # name is given
45+      DEST=$FILE_TO_RESTORE
46 		fi
47   fi
48   #use INCLUDE variable without create another one
49@@ -431,7 +433,7 @@ else
50 
51     --verify: verifies the backup (no cleanup is run)
52     --restore [path]: restores the backup to specified path
53-    --restore-file [file] [[path/new_name]]: restore a specific files, optional you can provide a destination name
54+    --restore-file [file] [path/filename]: restore a specific file, optional you can provide a destination name
55     --list-current-files: lists  the  files  currently backed up in the archive.
56 
57     --backup-script: let's you backup the script and secret key to the current working directory
58@@ -451,4 +453,5 @@ unset AWS_ACCESS_KEY_ID
59 unset AWS_SECRET_ACCESS_KEY
60 unset PASSPHRASE
61 
62+# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent: 
63 # EOF