问题
I need to copy a lot of data from remote share \s1 to share \s2. I'm using robocopy, which uses SMB protocol to copy files. My question -- does the protocol allow to copy data from S1 to S2 directly or all data has to go through the machine on which robocopy is running?
回答1:
It uses the machine that it's running on. It copies the data from source in memory (on the current machine - current) and from there to target. There's no other way (well there could be a client/server running on source/target and the client is able to be configured remotely to open a tunnel directly to the server and transfer the files - but that's not the case here).
You can check this out by trying to robocopy a large file from source to target and using Task Manager monitor the network traffic on:
- current - incoming + outgoing
- source - outgoing
- target - incoming
and see that any of the following match (as expected):
- source - outgoing = target - incoming
but also these ones (where current comes into play):
- source - outgoing = current - incoming
- current - outgoing = target - incoming
To do it directly robocopy (or any other file transfer tool) must run on either source or target.
回答2:
server side copy is known to work only to/from {sub}directories within the same share;if you are considering copying ./between./ shares and maybe across servers then it is another feature you need to rely upon to speed up your transfers; it is called ODX and as Harry Johnston stated you need relatively new clients to avail of such a feature ==>
https://blogs.technet.microsoft.com/askcore/2014/06/26/is-offloaded-data-transfers-odx-working/
[./.]"The computer initiating the data transfer must be running Windows Server 2012 R2, Windows Server 2012, Windows 8.1, or Windows 8."[./.]
https://technet.microsoft.com/en-us/library/hh831628.aspx
来源:https://stackoverflow.com/questions/31944769/smb-protocol-for-copying-files-between-remote-shares