Wednesday, August 27, 2008

How to move files from one web site hosting service to another

I'm working through my migration from Lunarpages to Dreamhost.

I'll have a series of posts outlining what I learn during this migration; it seems like the kind of topic that could sue some sharing.

The first step in my migration was to sign up with Dreamhost. I googled on "dreamhost coupon" and found a code that gave me $50 off, so my 1 year contract cost $70. I have 2 months left on my Lunarpags contract so I can take my time on the migration, transferring one domain at a time.

I haven't told Lunarpages I'm leaving of course; there's no need to muddy the waters. If they care they'll figure it out from the domain transfers anyway.

The next step is to move my files. I figured I'd learn about SSH/Telnet and tar balls -- but Lunarpages doesn't includes SSH with my account.

Lesson: Confident hosting vendors, like Dreamhost, provide services that make it easy to switch -- like Telnet/SSH on every account. You want a confident vendor.

If I did have SSH/Telnet access I'd use the advice in these two posts. The author's site is a bit hard on my eyes, but the content looks good ...
So I'm doing the old FTP down and up procedure. Tedious, but I have the time. Once the files are on Dreamhost with a temporary server name I've verify things are working. Then I'll be ready to switch domains.

Update 8/28/08: I figured out a better way. DreamHost has a web based FTP tool, so you can ftp from the old domain to DreamHost. Of course one could always do this from Telnet/SSH -- but I'd forgotten about command line ftp. It's been a long time since I've done that.

Update 8/29/08: Well, the net2ftp web tool was a bust. I couldn't see how to get it to move files from LunarPages to DreamHost -- and there's no documentation. On the other hand, Lunarpages allowed me to download a tar.gz archive of my entire site with one click. Kudos to them, I'd no idea that was possible. So now I'm FTPng it to Dreamhost and I'll see if I can expand it there either from the Net2ftp web interface or by activating my SSH access.

Update 8/30/08: I'm impressed with how worthless most of the online advice and documentation was about this. Here's what worked (thank you Raymond.cc)
  1. Go to Lunarpages Backup control panel and click link to download a backup file (tar.gz) of my Lunarpages site.
  2. FTP the 640MB archive to my DreamHost directory.
  3. Enable Bash SSH access on DreamHost.
  4. Download and install Tunnelier for Windows (I did this from my XP machine).
  5. SSH to DreamHost and run "tar -xzf backup-faughnan.com-8-29-2008.tar.gz"
At this point everything had been restored, but they were in the wrong folder. So I had to move them. This is where I really missed tools like Norton Commander, never mind Finder or Explorer!

I then used the following Bash commands to rearrange and cleanup (as usual unix documentation is awful):
  • rm -r mydirectoryname: removes mydirectoryname and all files it contains
  • ls: list directories.
  • cd mydirectoryname: change to mydirectoryname. Also use cd .. to move up.
  • mv mydirectoryname .. : moves mydirectoryname and all files up one directory level
  • mv * .. : move everything in local directory up one level. (There's supposed to be a switch for mv that forces an overwrite of existing files, but it didn't work for directories.)
If you want to switch to DreamHost my coupon code of KATEVA will get you the maximal coupon discount of $50 off a 1 year subscription.

1 comment:

Marsosudiro said...

Awesome to find your blog. I'm going to follow your process this evening. Fingers are crossed...