Copy a site's files from one host to another


/ Published in: Bash
Save to your folder(s)

Terms:
Site1 = http://site1.com/
Site2 = http://site2.com/

Site1Path = /home/user1045/domains/site1.com/html
Site2Path = /home/user9938/domains/site2.com/html


Copy this code and paste it in your HTML
  1. STEPS:
  2. 1) ssh into site1
  3. - ssh serveradmin@site1.com
  4. - enter password
  5. - “cd domains/site1.com”
  6. - “tar czf filesbackup.tar.gz html”
  7. - “mv filesbackup.tar.gz html”
  8.  
  9. 2) ssh into site2 and download files from site1
  10. - ssh serveradmin@site2.com
  11. - enter password
  12. - “cd domains/site2.com”
  13. - “rm -r html”
  14. - “wget http://site1.com/filesbackup.tar.gz”
  15. - “tar xvfz filesbackup.tar.gz”

URL: http://thriveline.com/blog/2009/10/copying-a-sites-files-from-one-host-to-another/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.