I have a case when I need to move data from an old server: host1 to a new server: host2. The problem is host1 cannot see host2, but I can use another server (localhost) to SSH to both host1 and host2.
Imagine it should work like this: host1 -> localhost -> host2
How can I use rsync to copy files between host1 and host2? I tried this command on localhost server but it says The source and destination cannot both be remote.
rsync -avz host1:/workspace host2:/rasv1/old_code-de