tmp
This commit is contained in:
11
backup.sh
11
backup.sh
@@ -4,6 +4,11 @@ source ./venv/bin/activate
|
|||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
bucket="${1}" ; shift
|
||||||
|
name="${1}" ; shift
|
||||||
|
backup_source="${1}" ; shift
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f ./keyring.tmp
|
rm -f ./keyring.tmp
|
||||||
@@ -28,12 +33,12 @@ tar \
|
|||||||
--xz \
|
--xz \
|
||||||
--one-file-system \
|
--one-file-system \
|
||||||
--file - \
|
--file - \
|
||||||
"${1}" \
|
"${backup_source}" \
|
||||||
| tmpgpg \
|
| tmpgpg \
|
||||||
--output - \
|
--output - \
|
||||||
--encrypt \
|
--encrypt \
|
||||||
--recipient hannes.koerber@haktec.de \
|
--recipient 0x078A167A8741BD30 \
|
||||||
| aws s3 cp \
|
| aws s3 cp \
|
||||||
--storage-class=DEEP_ARCHIVE \
|
--storage-class=DEEP_ARCHIVE \
|
||||||
- \
|
- \
|
||||||
s3://de-hkoerber-mycloud-backup/test.tar.xz.gpg
|
s3://${bucket}/${name}-$(date --utc -Iseconds).tar.xz.gpg
|
||||||
|
|||||||
Reference in New Issue
Block a user