scp and symlinks

Jun 21, 2008 16:06

Just got lazy and used scp instead of the normal "rsync -e ssh -xav":

find -type d -print )

Leave a comment

Comments 4

bigmel42 June 21 2008, 23:32:12 UTC
So what? I use scp all the time.

Reply

peter_jensen June 22 2008, 00:16:35 UTC
Well, scp seems to be one of those commands that works really well for a defined and limited set of operations, but never got moved to the point where it needed to solve all problems. Thus, it only handles symlinks one way (it de-references them all), so if you have self-referential symlinks or anything else like that it will do the Wrong Thing.

So, I still use it all the time, but if I need to copy anything more complicated than a single directory I usually use rsync over ssh, which is much more efficient in the case where some portion of the files are already there. I don't know how bad rsync is against scp or some other method when none of the files exist on the remote system, but most of my transfers are bandwidth-limited to about 80kB/sec so I hardly imagine it matters.

So unless you're trying to copy symlinks or otherwise map the semantics of one file system on to another, you should be fine.

-Peter

Reply

bigmel42 June 22 2008, 13:44:09 UTC


*sigh* I don't know what any of that means (not true, I know what ssh and "self-referential", and doing the "Wrong Thing" is).

But mostly, my reply was snotty. Stupid internet and its sarcasm scrambler.

Reply

peter_jensen June 22 2008, 14:35:42 UTC
It worked!

Go take a ride before the storms hit!

Reply


Leave a comment

Up