Saturday, June 26, 2010

Migrating to SharePoint 2010

Recently I've been migrating farms from SharePoint 2007 to 2010 using the attach database method. In this post I'm going to outline the steps I've used to perform the upgrade. I'm assuming SharePoint 2010  has been set up and that the visual compatibility mode will be used. 

Clean Up Your Current Environment 
Remove unused site collections, features, etc. Run "stsadm -o preupgradecheck" to identify potential problems.

Find the Customizations
Your disaster recovery plan will really come in handy here. If you don't have a disaster recovery plan, this will be a good start for one. Go to central administration and note your settings. They will need to be used to configure your new farm. Find the custom code and files that have been deployed to your farm. If solutions have been used to deploy customizations, they can be used to deploy to the new farm. Make copies of the web.config files, many of the custom settings have been made by hand. Think safe controls, http modules, application settings, connection strings. Run a comparison between your 12 hive and an oob 12 hive to find any differences. Check IIS for any folders or applications that have been added.

Copy your Content Databases
The databases can be detached and copied or backups can be taken. Copy the .mdf files to the new SQL Server.

Install Customizations to the new 2010 Farm
Install your solutions and features, move files into the 14 hive, edit the web.config files... Create new Web Applications for the ones you’re moving. Delete the configuration databases that are created.  

Attach the Content Databases to the new SQL Server 


Test Content Database against the Web Applications
Run Powershell command:     Test-SPContentDatabase -Name "contentdbname" -WebApplication "http://webapplicationurl"  This will give you the guids of missing features and let you know if there are any errors that would stop the upgrade.  

Attach the Content Database to the farm
Run Powershell command:     Mount-SPContentDatabase -Name "contentdbname" -WebApplication "http://webapplicationurl"

Test the upgraded farm