21 lines
558 B
Bash
Executable file
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"
|