53 lines
2.4 KiB
Text
53 lines
2.4 KiB
Text
**NOTE: currently, the script is undergoing some changes! You should use version 3 (0.3) for the time being until we have all the bugs/kinks sorted out.
|
|
|
|
More information about this script avaiable at: http://damontimm.com/code/dt-s3-backup
|
|
|
|
==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 --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).
|
|
You can put the script under bin directory of your user. If you have configured correctly your shell you will call dt-s3-backup.sh whenever you want.
|
|
Then make the script executable with "chmod +x".
|
|
|
|
==Common usage==
|
|
|
|
= View help
|
|
$ dt-s3-backup.sh
|
|
|
|
= Run an incremental backup of configured directory
|
|
$ dt-s3-backup.sh --backup
|
|
|
|
= Restore your backup
|
|
To restore the backup in the current work directory just run:
|
|
$ dt-s3-backup.sh --restore ./
|
|
|
|
You can provide another directory to restore, for example: I want to restore my backup in "my_restore" folder (not created yet or existing):
|
|
$ dt-s3-backup.sh --restore my_restore
|
|
|
|
If you don't provide a path you will prompt to answare some question to restore your backup
|
|
|
|
==Special usage==
|
|
|
|
= List files beckend up in the remote archive
|
|
$ dt-s3-backup.sh --list-current-files
|
|
|
|
= Restore a specific file
|
|
I have deleted my favourites picture file 'mygirlfriend.jpg' present in my "Pictures" home directory, I backup it with dt-s3-backup and I can restore it with:
|
|
$ dt-s3-backup.sh --restore-file Pictures/mygirlfriend.jpg
|
|
|
|
Now mygirlfriend.jpg is under "Pictures" directory.
|
|
But if I want to change the name when I restore it? I just need to provide a new name:
|
|
$ dt-s3-backup.sh --restore-file Pictures/mygirlfriend.jpg Pictures/myExgirlfriend.jpg
|
|
|
|
In my Pictures directory I have myExgirlfriend.jpg.
|
|
Attention: if "Pictures" directory doesn't exist you have got an error. You must provide an existing directory.
|
|
|
|
= Verifies the backup
|
|
$ dt-s3-backup.sh --verify
|
|
Then you can view the verification opening the log file (that you have previously configure).
|
|
|