From 2c90886299cd9df616bfaf6d488f05e25ac77ccb Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 12 May 2022 15:42:39 -0400 Subject: [PATCH] Add wrapper script around restic backup program --- bin/bin/restic.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 bin/bin/restic.sh diff --git a/bin/bin/restic.sh b/bin/bin/restic.sh new file mode 100755 index 0000000..e2cb45f --- /dev/null +++ b/bin/bin/restic.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +if ! command -v restic &> /dev/null +then + echo "restic not installed" + exit +fi + +export AWS_ACCESS_KEY_ID="$(pass jdormit-infra-spaces-access-id)" +export AWS_SECRET_ACCESS_KEY="$(pass jdormit-infra-spaces-secret-key)" +export RESTIC_PASSWORD="$(pass restic-jdormit-backup-spaces)" +export RESTIC_REPOSITORY="s3:nyc3.digitaloceanspaces.com/jdormit-backup" + +restic "$@"