I would like to copy a folder from one Unix server to another Unix server. Can anyone tell me if there is a method or command to to achieve this?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
migrated from stackoverflow.com May 30 '11 at 17:01
|
Yes, there is scp or the former rcp or rsync
The command above will copy |
|||||||
|
|
If your folder contains subfolders and more importantly symlinks you want to use rsync:
Or in reverse:
This will do a recursive backup / copy from localfolder to your server while keeping ownership and permissions intact. The solutions suggested so far are valid however scp doesn't handle symlinks by default and will instead create a new copy of the linked file. For detailed usage see man(1) rsync or here |
|||
|