From beaa8fff5b8d0b9c01472928ef4113eff62fd3c4 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Fri, 30 Sep 2022 10:59:55 +0200 Subject: [PATCH] added backup.sh --- bin/backup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/backup.sh diff --git a/bin/backup.sh b/bin/backup.sh new file mode 100755 index 0000000..3003501 --- /dev/null +++ b/bin/backup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -aeou pipefail + +RESTIC=/usr/bin/restic + +# some helpers and error handling: +trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM + +# shellcheck disable=SC1090 +source "${HOME}"/.restic/restic.env + +$RESTIC backup \ + --exclude-file="$HOME"/.restic/excludes.txt \ + --files-from="$HOME"/.restic/includes.txt \ + --verbose