added a new TODO regarding --restore-file (to working directory if no other directory is specified)
This commit is contained in:
parent
ed00dae498
commit
a843a4f3a5
2 changed files with 9 additions and 7 deletions
5
README
5
README
|
|
@ -5,10 +5,9 @@ More information about this script avaiable at: http://damontimm.com/code/dt-s3-
|
||||||
==TO DO==
|
==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
|
* 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
|
* 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 ===
|
=== USAGE EXAMPLE ===
|
||||||
You must configure the script before using it you can config it with your favorites test editor(read comments in script).
|
You must configure the script before using it you can config it with your favorites test editor(read comments in script).
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent:
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008-2010 Damon Timm.
|
# Copyright (c) 2008-2010 Damon Timm.
|
||||||
# Copyright (c) 2010 Mario Santagiuliana.
|
# Copyright (c) 2010 Mario Santagiuliana.
|
||||||
|
|
@ -346,7 +345,7 @@ elif [ "$1" = "--restore" ]; then
|
||||||
OPTION="restore"
|
OPTION="restore"
|
||||||
|
|
||||||
if [[ ! "$2" ]]; then
|
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
|
read -e NEWDESTINATION
|
||||||
DEST=$NEWDESTINATION
|
DEST=$NEWDESTINATION
|
||||||
echo ">> You will restore from ${ROOT} to ${DEST}"
|
echo ">> You will restore from ${ROOT} to ${DEST}"
|
||||||
|
|
@ -398,7 +397,10 @@ elif [ "$1" = "--restore-file" ]; then
|
||||||
if [[ "$3" ]]; then
|
if [[ "$3" ]]; then
|
||||||
DEST=$3
|
DEST=$3
|
||||||
else
|
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
|
||||||
fi
|
fi
|
||||||
#use INCLUDE variable without create another one
|
#use INCLUDE variable without create another one
|
||||||
|
|
@ -431,7 +433,7 @@ else
|
||||||
|
|
||||||
--verify: verifies the backup (no cleanup is run)
|
--verify: verifies the backup (no cleanup is run)
|
||||||
--restore [path]: restores the backup to specified path
|
--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.
|
--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
|
--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 AWS_SECRET_ACCESS_KEY
|
||||||
unset PASSPHRASE
|
unset PASSPHRASE
|
||||||
|
|
||||||
|
# vim: set tabstop=2 shiftwidth=2 sts=2 autoindent smartindent:
|
||||||
# EOF
|
# EOF
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue