2

If I have 5 servers, and each server has the exact same file structure, is there a ftp program that can replicate the same operation on all the servers?

e.g.:

/wwwroot/site1/

Now if I want to copy a file logo.jpg to the root of the folder:

/wwwroot/site1/logo.jpg

Is there a ftp program (maybe filezilla?) that I can setup so that I just copy the file over and then it performs the same operation on the other servers automatically?

user1361315
  • 367
  • 3
  • 4
  • 8
  • What OS do you use? This is easy to script on *nix – terdon Feb 21 '13 at 14:54
  • 1
    Not particularly difficult to script on windows either, but knowing the OS is necessary for the proper answer. – EBGreen Feb 21 '13 at 14:57
  • If you're using Windows, DFS should work swimmingly. – rtf Feb 21 '13 at 15:03
  • Similar or duplicate of http://superuser.com/questions/455277/upload-to-multiple-cdn-servers-simultaneously-via-ftp-or-ssh or (Windows specific) http://serverfault.com/questions/292785/uploading-to-multiple-ftp-sites-at-once-or-folder-sync – mr.spuratic Feb 21 '13 at 17:52
  • @terdon windows 7 – user1361315 Feb 21 '13 at 20:18
  • @mr.spuratic thanks but I'm looking for a FTP based solution, don't really have control over the servers. – user1361315 Feb 21 '13 at 20:20
  • "cdn push ftp" are the magic words, a quick search turned up this: https://github.com/wimleers/fileconveyor if you're comfortable with a Python solution, I've not used it though. – mr.spuratic Feb 22 '13 at 17:44

1 Answers1

1

user1361315, if you're using Windows 7 then you can use the built in FTP.exe client, which supports:

-s:filename.txt

So just put lines like:

open ftp.siteone.com
ftpuser
myPassW0rd
cd /wwwroot/site1/
bin
put logo.jpg
quit

In filename.txt and use:

ftp -s:filename.txt

You could easily create a batch file with some stub files which used:

copy /A siteone.txt+newcommand.txt filename.txt
 copy /A sitetwo.txt+newcommand.txt filename.txt

To join a "header" file for each site (different host, password, etc) with a common "newcommand" that did the same work for each of them and then runs FTP 5 times.

PSaul
  • 111
  • 2