Aggiungi 'glacier-restore'
Bash script for restoring backups from AWS Glacier
This commit is contained in:
22
glacier-restore
Normal file
22
glacier-restore
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source .rgs3-configrc
|
||||||
|
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
echo -e "Usage $0 <time or delta> [file to restore] <restore to>
|
||||||
|
Example:
|
||||||
|
\t$ $0 2018-7-21 recovery/ ## recovers * from closest backup to date
|
||||||
|
\t$ $0 0D secret data/ ## recovers most recent file nammed 'secret'";
|
||||||
|
exit; fi
|
||||||
|
|
||||||
|
if [ $# -eq 2 ]; then
|
||||||
|
duplicity \
|
||||||
|
--time $1 \
|
||||||
|
${GS3_BUCKET} $2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $# -eq 3 ]; then
|
||||||
|
duplicity \
|
||||||
|
--time $1 \
|
||||||
|
--file-to-restore $2 \
|
||||||
|
${GS3_BUCKET} $3
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user