dotfiles/bin/backup.sh
2022-09-30 10:59:55 +02:00

16 lines
348 B
Bash
Executable File

#!/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