#!/bin/bash set -x bastion=bastionhost login=user@hostname current=/backup/hostname via="-e \"ssh $bastion ssh\" $login:" rsync -aphvz --delete --compress $via/root/ $current/root/ ------------------ + bastion=bastionhost + login=user@hostname + current=/backup/user@hostname/current + via='-e "ssh bastionhost ssh" user@hostname:' + rsync -aphvz --delete --compress -e '"ssh' bastionhost 'ssh"' user@hostname:/root/ /backup/user@hostname/current/root/ Unexpected remote arg: user@hostname:/root/ rsync error: syntax or usage error (code 1) at main.c(1222) [sender=3.0.7]