local YELLOW="\e[0;33m"
local LIGHTPURPLE="\e[1;35m"
local RESET="\e[0m"
- local rsyncargs=("--archive" \
- "--verbose" \
- "--sparse"
- "--acls" \
- "--hard-links" \
- "--relative" \
- "--human-readable")
+ local rsyncargs=()
remote_user=$(yq \
--raw-output ".machines.\"$machine\".remote_user" config.yaml)
config.yaml \
2> /dev/null)
- if [ "$excludes" != "null" ]; then
- local exclude=
- for exclude in $excludes; do
- rsyncargs+=("--exclude=$exclude")
- done
- fi
- rsyncargs+=("--rsh=ssh -p $port")
local path=
for path in $pathes; do
printf "ℹ️ INFO: machine ${LIGHTPURPLE}%s${RESET}; " "$machine"
printf "path ${YELLOW}%s${RESET}\n\n" "$path"
+ rsyncargs=("--archive"
+ "--verbose"
+ "--sparse"
+ "--acls"
+ "--hard-links"
+ "--relative"
+ "--human-readable")
+
+ if [ "$excludes" != "null" ]; then
+ local exclude=
+ for exclude in $excludes; do
+ rsyncargs+=("--exclude=$exclude")
+ done
+ fi
+ rsyncargs+=("--rsh=ssh -p $port")
+
[ -n "$last_backup_dir_path" ] \
&& rsyncargs+=("--link-dest=$last_backup_dir_path/$machine")