various changes
parent
70f24ab727
commit
0d4eede20f
|
@ -27,6 +27,11 @@ function backup() {
|
||||||
if [[ ! -d $path ]]; then
|
if [[ ! -d $path ]]; then
|
||||||
warn "'$path' does not exist. Not backing up."
|
warn "'$path' does not exist. Not backing up."
|
||||||
else
|
else
|
||||||
|
for exclude in "${excludes[@]}"
|
||||||
|
do
|
||||||
|
args+=" --iexclude \"$exclude\""
|
||||||
|
done
|
||||||
|
|
||||||
restic_exec \
|
restic_exec \
|
||||||
backup \
|
backup \
|
||||||
--iexclude "__MACOSX" \
|
--iexclude "__MACOSX" \
|
||||||
|
@ -96,6 +101,7 @@ function test_path() {
|
||||||
host="de01"
|
host="de01"
|
||||||
repo="b2:zio-euc-servers"
|
repo="b2:zio-euc-servers"
|
||||||
|
|
||||||
|
excludes=()
|
||||||
paths=()
|
paths=()
|
||||||
passwd_file=""
|
passwd_file=""
|
||||||
pre_script=""
|
pre_script=""
|
||||||
|
@ -116,6 +122,8 @@ else
|
||||||
[[ -f "$env_dir/$host.post" ]] && post_script="$env_dir/$host.post"
|
[[ -f "$env_dir/$host.post" ]] && post_script="$env_dir/$host.post"
|
||||||
|
|
||||||
if [[ -f "$env_dir/$host.var" ]]; then
|
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) ]] && \
|
[[ ! -z $(get_prop "$env_dir/$host.var" PATHS) ]] && \
|
||||||
IFS=';' read -ra paths <<< "$(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) ]] && \
|
[[ ! -z $(get_prop "$env_dir/$host.var" SERVICES) ]] && \
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
PATHS="/etc;/srv/store;/var"
|
EXCLUDES="/etc"
|
||||||
|
PATHS="/etc"
|
||||||
|
#PATHS="/etc;/srv/store;/var"
|
||||||
SERVICES="container-photoprism"
|
SERVICES="container-photoprism"
|
||||||
|
|
Loading…
Reference in New Issue