printf "\n"
}
+get_machine_excludes()
+{
+ local machine="$1"
+ local excludes=$(cat config.yaml \
+ | yq --raw-output ".machines.\"$machine\".excludes[]")
+
+ [ "$excludes" == "null" ] && return
+ [ -z "$excludes" ] && return
+
+ local options=""
+ for exclude in $excludes; do
+ options=$(echo "$options --exclude=$exclude")
+ done
+
+ echo "$options"
+}
+
backup_remote_pathes()
{
local backup_path="$1"
[ -n "$pathes" ] \
|| errlog "config.yaml missing pathes for $machine" \
|| return $?
+ local excludes=$(get_machine_excludes "$machine")
local YELLOW="\e[0;33m"
local LIGHTPURPLE="\e[1;35m"
--hard-links \
--relative \
--human-readable \
+ $excludes \
$hardlinkopt \
--rsh "ssh -p $port" \
$hostpath \