All pastes #2052703 Raw Edit

Unnamed

public text v1 · immutable
#2052703 ·published 2011-05-02 03:26 UTC
rendered paste body
#!/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]