PDA

View Full Version : Moving hosts via CLI?


torifile
2009-03-10, 05:09
One of my domains with dreamhost is finally up for renewal and I want to leave them permanently. I want to move that domain over to my new linode account but I don't know the best way to go about it. I'm going to create the same databases on my new host as on my old one for seamless transition that way, but I wonder if there's a way to move my files over through the CLI so I don't have to download them locally and then upload them - my upload speed blows.

I've got shell access to both accounts. Something like a scp or curl command?

torifile
2009-03-10, 05:24
Ok. Nevermind. Just typing out my post clarified what I needed to do.

From my linode's shell:

scp -r [username]@oldhost/[directory] [newdirectory]

Are permissions preserved this way?

Taskiss
2009-03-10, 06:53
"-p" preserves the modes and I use it automatically, but that could be a default. so:

scp -rp user@remote:/home/myaccount .

Personally, I'd tar it up and pull it down to my local system in addition to copying it to the new site anyway.