Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:

How can i transfer the files between two servers. I think i can use Net::FTP. But i want to check how can we connect two server at a time and transfer files between both servers.

Replies are listed 'Best First'.
Re: FTP transfer files between two server
by ikegami (Patriarch) on Jun 24, 2009 at 13:53 UTC

    In general, you can use "FTPx", a fancy method of using FTP to transfer a file directly between two FTP servers. Net::FTP implements this as pasv_xfer

    Some servers block transfers from/to a machine that didn't initiate the transfer.

Re: FTP transfer files between two server
by pKai (Priest) on Jun 24, 2009 at 12:10 UTC
    ssh might be an option
Re: FTP transfer files between two server
by SuicideJunkie (Vicar) on Jun 24, 2009 at 13:19 UTC
    When you say 'connect two servers at a time', do you mean something like:
    • Client A
    • Server B
    • Client C
    Where both A and C connect to B, and then B mediates the exchange between A and C?
    Or perhaps one machine A, which connects to both B and C and pushes files out to (or pulls files from) both simultaneously?

      Hi SuicideJunkie,
      Yes. I have one server which should watch the both FTP server and transfer the files between the server whenever any files copied to FTP site. Hope you understand.