-2

I am going to move my website to a new server.

I need to copy the /var/www directory to the new server.

Should I use SCP or RSYNC ?

1 Answer 1

0

You can use either SCP or Rsync, they will both copy files for what you need.

For the following example, assume the following:

  • Your username on www1.example.com is jcitizen.
  • Your old web server is www1.example.com.
  • Your new web server is www2.example.com.
  • jcitizen on the old server has read permissions recursively on /var/www
  • The user on the new server has read & write permissions recursively on /var/www

SCP

scp -r [email protected]:/var/www /var/www

RSYNC

rsync -avzh [email protected]:/var/www /var/www

Not the answer you're looking for? Browse other questions tagged .