How to do SCP without following symbolic links

SCP is a powerful tool to copy content between computers.
If you have a specific set of files that you use over and over again in different folders, using symbolic links (or hard links) is clever method to save storage.
This is where SCP becomes less appropriate to sync folders. SCP follows symbolic links and copies N copies of the same files instead of keeping the symbolic link. As a result, and if the linked files are big, syncing becomes slow an definitely not efficient.

To overcome this problem I found that rsync is recommended because it keeps symbolic links as they were. Here is the example:
rsync -azuv -e ssh username@xx.xx.xx.xx:folder/* folder/

Make sure that the symbolic links have a valid path in the new pc.
Try to use relative paths instead of the full path when creating symbolic links.

source: http://forums.theplanet.com/lofiversion/index.php/t64844.html

No comments: