Aggiungi 'glacier-restore'

Bash script for restoring backups from AWS Glacier
This commit is contained in:
2022-04-08 23:59:47 +00:00
parent 6d4bb233c3
commit e784188a09

22
glacier-restore Normal file
View 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