Copy Folders from one Unix server to another?
Solution 1:
Yes, there is scp or the former rcp or rsync
scp -r source_folder [email protected]:destination_folder
The command above will copy source_folder
to destination_folder
in the user's
home directory on host.com
Solution 2:
If your folder contains subfolders and more importantly symlinks you want to use rsync:
rsync -aruv localfolder/ user@server:destination/
Or in reverse:
rsync -aruv user@server:destination/ localfolder/
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
Solution 3:
You can use SCP:
scp -rp foldertocopy/ user@server:destination/
or
rsync