.dots/scripts/restic/j5040.sh
2024-08-28 15:22:02 +02:00

21 lines
558 B
Bash
Executable file

#!/usr/bin/env bash
# author: Daniel Sommer <daniel.sommer@velvettear.de>
# license: MIT
[[ "$EUID" != 0 ]] && printf "error: permission denied!\n" >&2 && exit 1
directories=(
"/etc"
)
printf ">> starting restic backup...\n"
for directory in ${directories[@]}; do
seconds="$SECONDS"
printf "> backing up '"$directory"'...\n"
restic backup --verbose --no-scan --retry-lock 3h "$directory"
printf "> backup of '"$directory"' finished after "$(( $SECONDS - $seconds ))" seconds!\n"
done
printf ">> restic backup finished after "$SECONDS" seconds!\n"