2
0
Fork 0

various changes

main
Ducky 2022-02-23 06:12:31 +00:00
parent 70f24ab727
commit 0d4eede20f
2 changed files with 11 additions and 1 deletions

View File

@ -27,6 +27,11 @@ function backup() {
if [[ ! -d $path ]]; then
warn "'$path' does not exist. Not backing up."
else
for exclude in "${excludes[@]}"
do
args+=" --iexclude \"$exclude\""
done
restic_exec \
backup \
--iexclude "__MACOSX" \
@ -96,6 +101,7 @@ function test_path() {
host="de01"
repo="b2:zio-euc-servers"
excludes=()
paths=()
passwd_file=""
pre_script=""
@ -116,6 +122,8 @@ else
[[ -f "$env_dir/$host.post" ]] && post_script="$env_dir/$host.post"
if [[ -f "$env_dir/$host.var" ]]; then
[[ ! -z $(get_prop "$env_dir/$host.var" EXCLUDES) ]] && \
IFS=';' read -ra excludes <<< "$(get_prop "$env_dir/$host.var" EXCLUDES)"
[[ ! -z $(get_prop "$env_dir/$host.var" PATHS) ]] && \
IFS=';' read -ra paths <<< "$(get_prop "$env_dir/$host.var" PATHS)"
[[ ! -z $(get_prop "$env_dir/$host.var" SERVICES) ]] && \

View File

@ -1,2 +1,4 @@
PATHS="/etc;/srv/store;/var"
EXCLUDES="/etc"
PATHS="/etc"
#PATHS="/etc;/srv/store;/var"
SERVICES="container-photoprism"