Search code examples
windowsrobocopysmb

SMB protocol for copying files between remote shares


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?


Solution

  • 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.