I am trying to synchronise three VPS servers. My idea is something like this:
- Download all files from server A
- 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?
- Update the local directory from server A
- Wait for the local sync to finish
- Update the remote directories of server B and server C