backup.sh: håndter ekstra rsync argumenter per vert
This commit is contained in:
@@ -268,6 +268,15 @@ for host in "${hosts[@]}"; do
|
|||||||
"--log-file=${logdir}/${host}.log.$snapshot_date"
|
"--log-file=${logdir}/${host}.log.$snapshot_date"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
extra_array_name="${host}_extra_rsync_flags"
|
||||||
|
if declare -p "$extra_array_name" >/dev/null 2>&1; then
|
||||||
|
extra_rsync_flags_var="${host}_extra_rsync_flags[@]"
|
||||||
|
extra_rsync_flags=( "${!extra_rsync_flags_var}" )
|
||||||
|
for ef in "${extra_rsync_flags[@]}"; do
|
||||||
|
command+=( "$ef" )
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
exclude_array_name="${host}_excludes"
|
exclude_array_name="${host}_excludes"
|
||||||
if declare -p "$exclude_array_name" >/dev/null 2>&1; then
|
if declare -p "$exclude_array_name" >/dev/null 2>&1; then
|
||||||
exclude_paths_var="${host}_excludes[@]"
|
exclude_paths_var="${host}_excludes[@]"
|
||||||
|
|||||||
Reference in New Issue
Block a user