XCOPY Behavior copying between remote servers
I am trying to determine the bandwidth usage of XCOPY when copying files between two remote servers.
I am on an XP workstation running a batch file (over a WLAN) which uses XCOPY to copy files from \\server1 to \\server2.
When this copy is run how much file data is actually going through the workstation? Is the workstation actually reading and copying all of files between servers or is the actually copying of the files being handled at the network layer between the servers themselves?
Does Robocopy work the same way?
Data is transferred through your computer, by reading chunks from the source and writing them to destination. Remote-remote copy is a relatively rare operation and not worth the implementation complexity.
- Reachability: if client can reach both servers, it doesn't mean server A can reach server B directly.
- Compatibility: In Windows, UNC paths can point to SMB, WebDAV, old NetWare, and possibily other protocols. If both server connections use different protocols or variants, a direct connection can be complicated if not impossible.
- Security: Extending a file transfer protocol to add commands to establish connections to third-party servers can introduce security holes. See the FXP extension to FTP, and why no one uses it.
- Authentication: Server A does not have your credentials for server B. In typical SMB, the password is never transmitted in plain text, and what is transmitted cannot be sent further (delegation is only possible with Kerberos, which needs Active Directory or equivalent). And that's assuming both servers accept the same set of credentials... And having server A ask you for server B's password would be a Bad Thing.
Both XCOPY and Robocopy work the same way, since neither of them knows the difference between local and remote paths. File accesses from UNC paths are handled entirely by the Windows kernel itself.