Thursday, September 15, 2011

Migrating a SharePoint 2007 Blog to 2010 (Part 1)

Some of you may already know that we host the blog site for Joel Oleson at Rackspace. Well Joel was going to be giving a talk at the recent SharePoint Conference on the new world of SharePoint administration in SharePoint 2010. As part of that talk he (and Mike Watson) were going to touch on migrating sites from SharePoint 2007 to 2010. So we came up with this idea that we should migrate his current site live to one running onSharePoint 2010. This post talks about that migration and some of the things that I needed to do in order to perform this migration.

First of all, let’s understand the outline of what needed to be accomplished:

  • Acquire another server
  • Install SharePoint 2010
  • Perform a “preupgradecheck” on the old server
  • Install any prerequisites on the new server
  • Migrate the Content DB
  • Apply the new look and feel
  • Apply Joel’s theme

Sure seems simple enough, right? In the end it wasn’t all that hard – but there were a few “gotchas” along the way.

Acquire Another Server

Why did we need another server? There were 2 reasons: Because we wanted both the 2007 and 2010 site to show up simultaneously and because the old hardware was running on 32-bit architecture. As you may remember – SharePoint 2010 requires a 64-bit OS to run.

Install SharePoint 2010

This part was simple enough and to be honest, was another reason why we needed a second server. For this demo, we had already in stalled the bits for 2010 and we couldn’t make this site live before Monday as the NDA from Microsoft was still in place.

Perform an “stsadm –o preupgradecheck”

I can’t stress enough the importance of doing this on your 2007 SP2 (or later) site. This goes through your current site and checks all dependencies to ensure you are ready to go. Here is a screen-capture from Joel’s:







Install any Prerequisites on the Server

This means that any packages (WSP’s, Features…) that are installed on the source server need to be installed on the target server. In Joel’s case, this included the Community Kitfor SharePoint.

Confession: I forget to do this the 1st time I attempted the migration and the upgrade on the content DB failed. Good thing I had another copy of the source content DB (you should too!)

So off to codeplex I went and downloaded the install files. It is certainly nice when a package comes with an INSTALL.BAT but guess what? Any and all of those install files out there have to updated if they drop any files in

c:\program files\common files\microsoft shared\web server extensions\12\*

Know why??? Because in SharePoint 2010 the install directory changes to:

c:\program files\common files\microsoft shared\web server extensions\14\*

After updating their install.bat, all worked well.

Migrate the Content DB

Part of this step does including creating a new site collection. It doesn’t much matter what template you use, as you will be detaching and deleting it’s database. Once you have it created, go into central admin and delete the content DB from the WEB app.

Now, when I made a copy of Joel’s production DB, I just made a SQL Backup of the content. I could have copied the MDF and LDF files and moved them to the new server. But being lazy and only wanting to move one file, I opted for the “backup” method.

So now over on the 2010 server I opened SQL Studio and performed a “restore” of Joel’s content db. Note: you may need to either kill SQL connection or just restart the SQL service.

Now that I had a copy of the Content DB on the new SQL server, it is was time to connect it to SharePoint 2010. To do this, you have to use the command line as the GUI interface can not handle the upgrade. Open a CMD interface and navigate to the BIN directory:

c:\program files\common files\microsoft shared\web server extensions\14\bin

and perform the following:

stsadm –o addcontentdb –url enter your url –databasename enter your db name

The system will churn a bit, give you a little progress info… and hopefully you’ll see a 100%. Now it’s time to navigate to your site and enjoy the goodness of the migrated site. The reality is, you will not see any change! This is actually a good thing – you see SharePoint 2010 does an amazing job of enhancing the line between the IT Pro and the Designer/Developer role. We will talk more about this in the next blog post!

No comments:

Post a Comment