Search code examples
fileubuntusharing

Fastest way to transfer a file between two local web Ubuntu servers?


What is the fastest way to transfer a file between two Ubuntu web servers? The servers are local to each other. Would it be better to have a shared drive or to use a transfer protocol? Preferably with PHP facilitating the transfer between the two files.


Solution

  • So it seems the SCP command would be the best way to go about this. PHP provides a set of SSH2 functions in particular ssh2_scp_send http://php.net/manual/en/function.ssh2-scp-send.php which appears to be the most appropriate.