Reputation: 5122
I have two servers with non-standard ssh ports:
To sync data from liveserver to testserver, I thought I'd ssh into testserver and rsync the data to local (aka testserver) from there.
ssh [email protected] -p 456 rsync -zra -e "ssh -p 123 --delete --exclude='.env' [email protected]:/path/to/dump.bz2 path/to;
This gives me
Unexpected remote arg: [email protected]:/path/to/dump.bz2
rsync error: syntax or usage error (code 1) at main.c(1354) [sender=3.1.3]
Is my concept wrong or just the syntax?
Upvotes: 1
Views: 1431
Reputation: 408
ssh [email protected] -p 456 "rsync -zra -e 'ssh -p 123' --delete --exclude=.env [email protected]:/path/to/dump.bz2 path/to"
not tested
Upvotes: 2