#!/bin/bash set -Eeuo pipefail export PATH="/opt/restic/bin:$PATH" . /opt/restic/etc/restic.conf if [ -f /opt/restic/etc/excludes.txt ]; then RESTIC_OPTIONS+=("--exclude-file=/opt/restic/etc/excludes.txt") fi echo "Starting a backup..." restic backup "${RESTIC_OPTIONS[@]}" "${RESTIC_TARGETS[@]}" "$@"