From bc2f444b75097846e46e43bf71ec901553c04428 Mon Sep 17 00:00:00 2001 From: Clemens Date: Fri, 10 Mar 2023 15:20:35 +0100 Subject: [PATCH] Added restic-snapshots --- .../docker-backup/image/resources/install.sh | 2 -- .../image/resources/restic-snapshots.sh | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 infrastructure/docker-backup/image/resources/restic-snapshots.sh diff --git a/infrastructure/docker-backup/image/resources/install.sh b/infrastructure/docker-backup/image/resources/install.sh index 7c58fce..7dec1b7 100755 --- a/infrastructure/docker-backup/image/resources/install.sh +++ b/infrastructure/docker-backup/image/resources/install.sh @@ -1,7 +1,5 @@ #!/bin/bash -apt-get update > /dev/null; - install -m 0700 /tmp/entrypoint.sh / install -m 0700 /tmp/entrypoint-start-and-wait.sh / diff --git a/infrastructure/docker-backup/image/resources/restic-snapshots.sh b/infrastructure/docker-backup/image/resources/restic-snapshots.sh new file mode 100755 index 0000000..ca889ce --- /dev/null +++ b/infrastructure/docker-backup/image/resources/restic-snapshots.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -o pipefail + +function main() { + file_env AWS_ACCESS_KEY_ID + file_env AWS_SECRET_ACCESS_KEY + + restic -r ${RESTIC_REPOSITORY}/files snapshots +} + +source /usr/local/lib/functions.sh +source /usr/local/lib/file-functions.sh + +main