Skip to content

Commit

Permalink
added a new TODO regarding --restore-file (to working directory if no…
Browse files Browse the repository at this point in the history
… other directory is specified)
  • Loading branch information
thornomad committed Mar 5, 2010
1 parent ed00dae commit a843a4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
11 changes: 7 additions & 4 deletions dt-s3-backup.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit a843a4f

Please sign in to comment.