Copy a Linux website from server to server

 

http://michaelquale.com/91233/copy-a-linux-website-from-server-to-server/

Backup:

  • Open a SSH terminal session. Navigate to the site root. typically /var/www/vhosts/mydomain.com/httpdocs or username/home/html/
  • from the command line execute tar -cvf site.tar.gz ./

     

    Restore:

  • Open a SSH terminal session. Navigate to the site root
  • From the command line execute:
  • wget http://mydomain.com/site.tar.gz

  • When the file finishes transferring execute tar -xvf site.tar.gz
  • The files will be uncompressed into their original locations, and will have the same permissions as the originals.
  • Back to Top