SCP and symbolic links

I use 'scp' to copy files from one server to another.

Looking deeper into the file structure it is obvious that symbolic
links are copied as files (i.e. they do not appear as links on the
destination side).

How can I solve this? Any alternative to scp?

Best regards,
Kenneth
Kenneth Brun Nielsen [ Mi, 02 April 2008 17:41 ] [ ID #1933540 ]

Re: SCP and symbolic links

Kenneth Brun Nielsen wrote:

> I use 'scp' to copy files from one server to another.
>
> Looking deeper into the file structure it is obvious that symbolic
> links are copied as files (i.e. they do not appear as links on the
> destination side).
>
> How can I solve this? Any alternative to scp?

Well, my usual answer is: use rsync, which runs over ssh anyway.
Another option is to tar the data across the network, eg usually some
variation of (GNU tar)

tar -czvf - /src/dir | ssh remotehost "(cd /dst/dir ; tar -xzvf -)"

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.
PK [ Mi, 02 April 2008 18:21 ] [ ID #1933542 ]

Re: SCP and symbolic links

Post removed (X-No-Archive: yes)
Notifier Deamon [ Mi, 02 April 2008 20:08 ] [ ID #1933551 ]
Linux » comp.unix.shell » SCP and symbolic links

Vorheriges Thema: bash: Question about IFS and while loop??
Nächstes Thema: Measuring response time from a URL