diff --git a/README b/README index 4d77abb..854ba16 100644 --- a/README +++ b/README @@ -5,10 +5,9 @@ More information about this script avaiable at: http://damontimm.com/code/dt-s3- ==TO DO== * 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 -* Clean up general formatting of the script and make it pretty -* give demo on how to use an "--archive-dir" option -* test --restore-file (specific) option <--- marionline --- seem to work fine for me, test with little archive * Add --restore-dir option +* --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. +* add option to be able to restore a file from a specific time period (not just the latest version) === USAGE EXAMPLE === You must configure the script before using it you can config it with your favorites test editor(read comments in script). diff --git a/dt-s3-backup.sh b/dt-s3-backup.sh index 44e1bfd..2f226bb 100755 --- a/dt-s3-backup.sh +++ b/dt-s3-backup.sh @@ -1,5 +1,4 @@ #!/bin/bash -# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent: # # Copyright (c) 2008-2010 Damon Timm. # Copyright (c) 2010 Mario Santagiuliana. @@ -346,7 +345,7 @@ elif [ "$1" = "--restore" ]; then OPTION="restore" if [[ ! "$2" ]]; then - echo "Please provide a destination path (/home/user/restore-dir):" + echo "Please provide a destination path (eg, /home/user/dir):" read -e NEWDESTINATION DEST=$NEWDESTINATION echo ">> You will restore from ${ROOT} to ${DEST}" @@ -398,7 +397,10 @@ elif [ "$1" = "--restore-file" ]; then if [[ "$3" ]]; then DEST=$3 else - DEST=$FILE_TO_RESTORE + # TODO - this restores it to the original location, I think would be + # better if we restored it to the current working directory if no file + # name is given + DEST=$FILE_TO_RESTORE fi fi #use INCLUDE variable without create another one @@ -431,7 +433,7 @@ else --verify: verifies the backup (no cleanup is run) --restore [path]: restores the backup to specified path - --restore-file [file] [[path/new_name]]: restore a specific files, optional you can provide a destination name + --restore-file [file] [path/filename]: restore a specific file, optional you can provide a destination name --list-current-files: lists the files currently backed up in the archive. --backup-script: let's you backup the script and secret key to the current working directory @@ -451,4 +453,5 @@ unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset PASSPHRASE +# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent: # EOF