1

I am trying to synchronise three VPS servers. My idea is something like this:

  1. Download all files from server A
  2. Upload downloaded files to server B and C

This does not need to happen automatically (making a couple of clicks to trigger it would be nice). Is this possible using FileZilla or some other similar client?

Due to a restriction, the servers can't open sockets to each other so using another device (my computer) to transfer the files seems like the only possible solution to me.

Is what I'm trying to do possible? Can I automate this in a .sh file or a .bat file to run on my Windows 10 or Fedora 31 PC so I only have to run the script?


Edit: So far, using a WinSCP script example, I have done this:

open sftp://username:pass@hostA:2022
synchronize local E:\SFTP_Sync\hubs /

open sftp://username:pass@hostB:2022
synchronize remote E:\SFTP_Sync\hubs /

open sftp://username:pass@hostC:2022
synchronize remote E:\SFTP_Sync\hubs /

exit

Before I run this and mess everything up, is this going to do the following?

  1. Update the local directory from server A
  2. Wait for the local sync to finish
  3. Update the remote directories of server B and server C
0

1 Answer 1

1

Your can use WinSCP. It supports synchronization both in its GUI and in script.

For GUI, see FileZilla - How to synchronize two-way (newest file wins)? (which also explains that FileZilla does not support synchronization).

For scripting, see Synchronize files to an SFTP server – It's for SFTP, but it's not different to FTP, except for the connection info.

(I'm the author of WinSCP)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .