moving

Moving a website directory to a new server

Unfortunately, scp doesn't handle links, instead it tries to copy
whatever the link refers to, leading to the recursive directory tree.

Its probably easiest to just tar up the data since tar handles symbolic links and preserves file permissions. Something like:
server1 $ cd /www/html
server1 $ tar -cf site.tar .
server1 $ scp site.tar server2:/www/html/ && rm site.tar
then:
server2 $ cd /www/html
server2 $ tar -xf site.tar && rm site.tar

ref:Theron Toomey

Syndicate content