LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-29-2007, 03:45 AM   #1
longstockings
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Rep: Reputation: 0
Using SSH to copy web site to new host


Hello

I have 2 ssh enabled web servers

1 = asmallorange (excellent)
2 = dreamhost (early days)

I have a web site on asmallorange that I would like to move to Dreamhost but have not got a clue as to how to do this
Normally I would download and upload via ftp but the site is quite large (lots of pictures) and it would take me ages. I thought winscp would enable me to do this but am unclear as to how as when I logged in there was no option to copy a site from host to host.

If someone could point me to a tutorial or explain how this is achieved with code examples I'd really appreciate it as I have been unable to find anything newbie friendly using Google.

Many Thanks


Richard
 
Old 03-29-2007, 04:08 AM   #2
Vikas Jayna
LQ Newbie
 
Registered: Mar 2007
Location: Noida, Delhi (NCR), India
Distribution: Fedora
Posts: 11

Rep: Reputation: 0
Try the scp command like this:

scp -r <directory name> <user>@<servername>:<path where files are to be copied>

Another popular way of copying is to create tar of all the files and then transfer the tar file to the new server and untar it
 
Old 03-29-2007, 04:26 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can't copy "a site" as at the level you're working at just sees a bunch of files. i'd probably suggest running rsync over ssh to best syncrhonise the two directories.

btw, good luck with dreamhost, they've had quite a few ugly outages in the few months i've been using them.
 
Old 03-30-2007, 03:49 AM   #4
longstockings
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Dreamhost

I read allot about Dreamhost and yes people have had outages but you get that no matter where you are. I can't really comment so far as I have not been with them long but what I did like is that by changing the name servers to Dreamhosts the domain transferred immediately and the domain though it has no content pops up really quickly.

Getting back to my problem

If I use putty to SSH onto the Asmallorange server what command would I issue to have the entire site synched over to the new host

The path to the ASO domain is

Could someone please post or point me to a command example specifying fake paths, usernames and passwords so that I may copy this and just input the correct information. This would be really handy to know for future site movings aswell.

Thanks
 
Old 03-30-2007, 04:47 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you wouldn't use putty itself, its psftp tool could do that certainly, as could winscp if you want a windows gui equivalent.
 
Old 03-30-2007, 05:35 AM   #6
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Quote:
Could someone please post or point me to a command example specifying fake paths, usernames and passwords so that I may copy this and just input the correct information. This would be really handy to know for future site movings aswell.
man rsync
http://samba.anu.edu.au/ftp/rsync/rsync.html
http://www.fredshack.com/docs/rsync.html

won't do your homework for you, though.
if you run into a problem other than 'I don't want to read TFM' come back here, people will help.
 
Old 03-30-2007, 05:56 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by baikonur
man rsync
http://samba.anu.edu.au/ftp/rsync/rsync.html
http://www.fredshack.com/docs/rsync.html

won't do your homework for you, though.
if you run into a problem other than 'I don't want to read TFM' come back here, people will help.
yeah that was my suggestion as the ultimate goal, dreamhost don't allow rsync directly thoguh, so it'd be via ssh as the spawned shell. which is nice.
 
Old 03-30-2007, 06:00 AM   #8
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Quote:
Originally Posted by acid_kewpie
yeah that was my suggestion as the ultimate goal, dreamhost don't allow rsync directly thoguh, so it'd be via ssh as the spawned shell. which is nice.
it's not difficult: -e ssh
I'm using it for backups and it sure is nice! (and since my servers don't listen on port 22 for ssh any longer, it's peaceful in the bargain...)

baik
 
Old 03-30-2007, 06:48 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
oh yeah, i've spent the last month uploading my mp3 collection from my home server to dreamhost over ssh/rsync. working like a charm.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh + pop3 with kmail: Could not connect to host localhost, but ok without ssh Emmanuel_uk Linux - Networking 0 07-20-2006 04:56 PM
I have a site I made in php what is a good company to host it? abefroman Programming 2 01-10-2006 09:31 AM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 05:28 PM
i want to host my site farhan Linux - General 2 03-22-2003 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration