0

How can I rsync files between two remote servers?

I need to transfer files between two remote hosts, but it seems rsync doesn't support synchronization.

Some more information: I have 2 servers A and B, and there is no direct connectivity between A and B. So direct rsync is not possible. But I have a 3rd server from when I have uni-directional connectivity.. Like I have the connectivity from C to A and C to B.

So can anybody help me here to rsync the file from server A to server B by using mediator as C?

Thanks in advance.

2
  • 1
    Would use ssh tunneling between A-C and C-B bridging them together (there are tons of examples around, its a one-line command). Then issue a normal rsync between A and B. Commented Mar 19, 2018 at 16:37
  • There seem to be several links on this site that already deal with your question. Did you notice either of these? unix.stackexchange.com/questions/284079/… unix.stackexchange.com/questions/183504/… Commented Mar 19, 2018 at 21:26

1 Answer 1

0

Whilst its not the nicest way of doing it, here's an option:

Use SSHFS. Create two folders on your local system (serverC) (e.g. folder1, folder2).

sudo apt-get install sshfs

then run this:

sudo sshfs -o allow_other,defer_permissions user@serverA:/folder/ /mnt/folder1

and this:

sudo sshfs -o allow_other,defer_permissions user@serverB:/folder/ /mnt/folder2
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.