Why do files that I copy from one AFP share to another AFP share on the same server have to go through my client machine?

1

I have two AFP file shares mounted on my OS X laptop. Both AFP shares are on the same OS X server. When I copy files across them, it looks like the files transfers to my machine first and then back up to the server. Is seems like a waste of time. Why can't it transfer it directly without having to down the network and back up?

chuboy

Posted 2010-09-18T23:06:21.603

Reputation: 111

Answers

1

Filesystems don't know when they're copying files. They know that an application has opened a file and is reading from it, and they know that an application has created another file and is writing to it, but there's no way for the filesystem to know that the new file being written is ultimately intended to be an exact copy of the file being read from.

If you want to transfer a file directly on a server, do something like this:

ssh user@host cp src dest

or this:

scp user@host:src user@host:dest

(scp remote-to-remote tells the src host to connect directly to the dest host, which in this case is the same host, so I believe it'll be a local-on-the-server loopback scp copy.)

Spiff

Posted 2010-09-18T23:06:21.603

Reputation: 84 656