From a75335a147efec2cd9b66d58ef73b68538aaef7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 13 Apr 2019 20:51:27 +0200 Subject: [PATCH] tmp --- backup.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 255e6d0..2d735ca 100755 --- a/backup.sh +++ b/backup.sh @@ -4,6 +4,11 @@ source ./venv/bin/activate set -o nounset set -o errexit +set -o xtrace + +bucket="${1}" ; shift +name="${1}" ; shift +backup_source="${1}" ; shift cleanup() { rm -f ./keyring.tmp @@ -28,12 +33,12 @@ tar \ --xz \ --one-file-system \ --file - \ - "${1}" \ + "${backup_source}" \ | tmpgpg \ --output - \ --encrypt \ - --recipient hannes.koerber@haktec.de \ + --recipient 0x078A167A8741BD30 \ | aws s3 cp \ --storage-class=DEEP_ARCHIVE \ - \ - s3://de-hkoerber-mycloud-backup/test.tar.xz.gpg + s3://${bucket}/${name}-$(date --utc -Iseconds).tar.xz.gpg