Published
Thursday, August 17, 2006 8:24 AM
by
mtaulty
I've just been through the slightly painful process of trying to upgrade my Blog from the .Text engine (0.95) to the CommunityServer engine (2.1).
The driving force behind this was really that I was finding that less and less tools were working with .Text and it was becoming a bit legacy and, also, it was on .NET Framework V1.1 and the rest of my site is running 2.0.
I found that downloading and installing CommunityServer was pretty easy but migration was a bit tricky.
There's a tool up here which will do a conversion from .Text to CommunityServer for you. There's a couple of tools around (this is the main one I found) but they work with earlier versions of CommunityServer so you have to install a V1.x version and then run conversion and then finally upgrade your CommunityServer to a V2.x version. I'd already installed CommunityServer when I found this out so I gave up on it.
In the end, I wrote some C# code to do the conversion myself and unpicked the CommunityServer tables as best I could to see what needed to go where when I made a post.
It should be said that my migration is probably easier than most in that I only had a single .Text blog and I didn't use any other fancy features of the engine so I only wrote the code that I absolutely seemed to need in order to do the conversion.
Once the conversion was done I wanted to switch off the .Text engine but there are a few URLs out there on the web that link to my existing .Text posts with URL's like;
http://mtaulty.com/blog/archive/2005/06/29/2865.as...
and, post conversion, these links aren't going to work anymore because the URLs have moved and the post-ids have moved (I'm sure I'm using the hyperlink functions of these blog engines incorrectly as they seem a bit hard-wired to me).
So, as part of the conversion process I capture the original post ID and the new post ID and store that in a table and then I built an IHttpModule which would use that data to redirect old posts to new posts and that seems to be working ok for me. If you find broken links please let me know as my regular expressions might be a bit wonky :-)
For anyone who's trying to go from .Text to CommunityServer I thought I'd share my code here in order that you at least have a skeleton to start from. Please note that this code will not "just work" out of the box and it was conjured up from pure guesswork but I managed to get it going in the end. Maybe you'd be able to use it to get your conversion kick-started rather than starting from scratch.