Dec 2, 2008 at 3:18 PM
Edited Dec 9, 2008 at 9:28 AM
.TEXT migration. I did it :) Here's what you'll have to go through to get your old 2004 data from SQL to a new 2008 xml file.
Vista Ultimate (IIS7 embedded)
MS SQL Server 2005 Enterprise Evaluation Edition
http://www.microsoft.com/downloads/details.aspx?FamilyId=cb34fff7-b2c1-4f5b-9b4f-f355a2ed87dc&DisplayLang=en which include the Management Studio we need.
SubText 2.0 http://www.SubTextproject.com/
1-- You have to be in administrator mode. Because security is draconian, I did allow everybody with full rights to the inetpub folder so that there's no problem (only network services/local services and IUSR/ are used but sometimes you go crazy and you don't
want to have permissions issues when doing this, trust me).
2-- Activate IIS7.
3-- Install SQL Server 2005 Enterprise Evaluation Edition.
4-- Install SubText 2.0 on localhost, all settings by default (don't forget to put the DefaultAppPool to Classic mode)
http://blog.needforgeek.com/archive/2006/12/11/DebuggingSubTextOnWindowsVistaUsingIIS7.aspx. Create a blog and a user/pwd.
Now that you have the import/export blogengine set and SQL Server, we're gonna start to get the old SQL db on local.
5-- Launch SQL Server Management Studio, connect to your db provider with your credentials. Right click on your db and choose task => export data.
Now the export wizard is open and you just have to follow the instructions. Export to a file or directly to a new database doesn't matter (it's always local for SQL Server). If you export to a file, simply attach it to SQL after you're done with the export.
6-- Once your .TEXT db is on your local SQL server, we're gonna populate the SubText one with it. For that we're still going to use the Management Studio and use some SQL scripts.
7-- Open the importdotText095 SQL script (located into the SubText.Installation\Scripts subfolders of SubText source code, see below) with SQL Management Studio.
a/ Apply the script on the destination database (SubText).
b/ Change the BlogGroup to BlogGroupiD (ln 53).
c/ CTRL+SHIFT+M and simply put your dbs names in the values boxes.
8-- Test the script with CTRL+L, there should be no warnings. Apply the script. If there's quite some content (like hundreds of posts) it could take a little while.
9-- After that, SubText db should be populated with your .TEXT content, without the ViewCount of your posts. Get this SQL script and do the same as the a/
If everything is fine, you should go to localhost/[name of your SubText app] and be able to see all your imported content (stop SQL Management before otherwise you'll have a permission error). If you login, you should be able to see the ViewCount too.
10-- For a reason I can't remember of, SubText BlogML export was not successful, we had to hack a little bit a .dll, the -guess what- SubText.BlogML.dll. Here's
the binary, here's the
full source. Drop the dll into the bin folder of your SubText app then navigate to the import/export tab of the admin screen, uncheck the "Embed Attachments?" and hit
the save button. The export should go on and display its content on your browser (choose open xml file, saving it was failing the export). Wait to the end and save the file as.
Now you have your .TEXT converted to BlogML and can import it wherever you want! The import works like a charm with BE although I chose Graffiti for the overall simplicity plus the cool admin UI.
Bugs: the SubText BlogML export didn't take the viewCount (doh! don't tell my buddy), hours were incremented by 10... For the rest (EU special characters and shit) everything is there.
Thanks a million to michaK for the coding skills.
Hope this will help somebody :)