Heinrich Heine
Heinrich Heine

Reputation: 303

copying file of remote source to remote target folder

I need to copy a file from a remote server to the same remote server, but with limited bandwidth. I have decided to do so with scp.

scp -l 8000 myuser@myserver:/my/source/path/myfile.data myuser@myserver:/my/target/path/

So now my question is: Will the stream of the file travel from the remote server to my local machine and then back to the remote server?

Upvotes: 1

Views: 836

Answers (1)

cody
cody

Reputation: 11157

From the scp man page:

 -3      Copies between two remote hosts are transferred through the
         local host.  Without this option the data is copied directly
         between the two remote hosts.  Note that this option disables
         the progress meter.

So no, the data will not be transferred through your local machine unless you specify the -3 flag. See this superuser post on why you may or may not want to do this.

Upvotes: 1

Related Questions