Migrating from XML to MSSQL

Jul 28, 2012 at 2:36 PM

Hi guys, I recently found out that BlogEngine has database support but my question is if it is possible to move all existing data to the database? I have a lot of content on my website and don't want to loose it.

 

Thanks

Jul 29, 2012 at 12:23 AM

GateKeeper,

If you're comfortable with SQL, I created a SQL Script that can migrate multiple blogs using the XML Provider to MSSQL.  Here's the thread where I mentioned it.  I documented it pretty extensively on my wiki, which is located here.

Hope that helps you.

-Dave

Jul 30, 2012 at 2:11 PM

I didn't really understand what you did when you moved the posts from the xml files to the database. You said you selected the values from "SUEETIE_BEPOSTS" but I only have xml files for the posts.

Jul 30, 2012 at 2:32 PM

GateKeeper,

I should have mentioned that the script is used as a template for stand-alone BlogEngine.NET deployments, with additional information specifically for Sueetie users.  (http://sueetie.com.) Sueetie users have BlogEngine.NET SQL the script can pull data from, like Sueetie_BePosts and a few others, making the process considerable easier.

-Dave

Jul 30, 2012 at 4:51 PM

Hi, I managed to convert from XML by creating a c# program to parse the files. It took me a long time but I finally did it.

 

Thanks anyway mate.

Jul 30, 2012 at 4:58 PM
Edited Jul 30, 2012 at 4:59 PM

GateKeeper,

That was a smart approach.  Congrats!  And yes, migrating BE.NET from XML to SQL requires some coding, either in C# or T-SQL. It did for me, too. :)

-Dave

Jul 31, 2012 at 1:52 PM

I have this strange problem where images no longer load in my posts after the migration. I deleted all my old local storage files except the "files" folder. Anyone know what is causing this?

Jul 31, 2012 at 2:04 PM

GateKeeper,

You retained the "files" folder, so nothing should be different when the image display httpHandler processes the photo. You might want to inspect the urls in the post to make sure no type of UrlEncoding occurred to the image.axd url.  Maybe someone else has a better idea, but that's the only thing I can think of.  

-Dave

Jul 31, 2012 at 4:09 PM
daveburke wrote:

GateKeeper,

You retained the "files" folder, so nothing should be different when the image display httpHandler processes the photo. You might want to inspect the urls in the post to make sure no type of UrlEncoding occurred to the image.axd url.  Maybe someone else has a better idea, but that's the only thing I can think of.  

-Dave

 

I found the problem. I was running on local host and the URL had an extra bit at the end (like http://domain.com/test/ instead of http://domain.com/). It works online. My migrated was 100% successful :)