The New and Improved Blog of Lee Grey nee JCranky

Menu

What an accomplishment!

Who ever would have thought that moving a blog could be such a major endeavor?!

For about three years, I’ve been running my blog on Pebble, a Java-based web app, running in Tomcat. For some reason, though, Pebble sort of lost its mind many months ago. I’ve been unable to post, or I could post and it would then vanish. My catalina.log file is loaded with stack traces from Pebble. Sometimes they come every few seconds. You can imagine how that adds up over months.

So, temporarily, I started blogging at another site, http://urlinone.com/blog, running WordPress. And in my Pebble template, I put a big header that said my blog had moved. Ugly.

Over the last couple of months, I’ve been slowly dealing with this issue. The first problem was moving all the Pebble posts to a new instance of WordPress. Unfortunately, they have completely different URL schemes, so, even if I could move all the posts, all the links out there in the world would now point to pages that WordPress couldn’t serve. Enter Ruby.

I used Ruby to spider my own site, creating directories and HTML pages to mirror my Pebble blog. This was complicated by the fact that, as I mentioned, Pebble had lost its mind. So, many pages that should have had content actually did not. And the links were, therefore, missing, as well. So my spidering effort ended up being a multi-step process of spidering a bunch of smaller, disconnected webs, rather than one big one. I also took this opportunity to zap all the spam comments, so they didn’t end up in my legacy blog.

At last, I uploaded all these now static blog pages up to my web host, so that all the old URLs will still find a page present (albeit static). Unfortunately, I forgot to remove the “This blog has moved” header from all the static pages, so I’ll have to go back and take care of that.

Next, I had to do an export from the temporary blog at http://www.urlinone.com/blog, so that I could import it into the soon-to-be new WordPress blog for http://www.leegrey.com/hmm. That, I’m happy to say, went very smoothly. One interesting note… My first export was done before deleting all the comments that Akismet had caught. It was 237KB. Then I deleted all the spam comments and did another export. 38KB. Sheesh! If only I was as prolific as the spammers.

Now came the real fun. I had to figure out how to modify the DNS zone file for the web host where Pebble is running, so that I could essentially split my domain. I only wanted to move my blog to the other web host running WordPress. All my other subdomains and my email, FTP, SSH, and such needed to stay put. I had never tried to do anything quite this sophisticated in a zone file before, but I spent some time learning about DNS, and it turned out to be pretty easy. The key was discovering that CNAMEs are basically aliases for A records.

All I had to do was create a couple of new A records for leegrey.com. and www.leegrey.com., pointing to the IP address of the server hosting WordPress. Everything else was using a CNAME that didn’t seem to be affected by my changes. The most confusing part was the fact that there was a record identified as @, which, in this case, represented leegrey.com. I was afraid that everything was going to break when I changed that to point to the foreign web host. It seemed like moving the root of a directory tree, so that everything below it would also be moved. Fortunately, I was able to simply comment out the A record for the @, explicitly define the two new A records, and the rest stayed as is. So far, it all looks okay. My only concern is the propagation delay with DNS changes. I’m not sure if I’m seeing cached info that will break in a couple of days. I’m most worried about my MX records being hosed and my email suddenly going silent.

All I can say is, it was fun using Pebble for a while. And I’m so happy to be on WordPress now! It’ll be a long, long time before I change blog software again.