>
Blog
Book
Portfolio
Search

5/22/2007

5495 Views // 0 Comments // Not Rated

A Tale of Two Servers: Migrating SharePoint From a Hosted 2003 Environment to a Local 2007 Server

When it comes to SharePoint 2007 migrations, Microsoft has plenty of different ways to approach them…well…actually only two different ways. And of course, when I sat down to perform our migration, the feasibility of each of these paths quickly evaporated. Here is the tail of my migration woes and the twisted path down which I had to travel to get it to work.

Microsoft’s website, like I said, outlines two different ways to upgrade a SharePoint 2003 portal to 2007.

  • The “In Place” upgrade.  Simply install 2007 directly on top of the 2003 server.  Easy huh?  No seriously, that’s like seven or eight mouse clicks, and you have successfully migrated your SharePoint environment.
  • The “Gradual” upgrade.  In this fun scenario, you install 2007 separately, and run it side by side with your 2003 environment; each one has its own configuration database.  Then, on a site by site basis, content is moved over.

The details are here.

If you detected any sarcasm or bitterness so far, it’s because of one simple little thing Microsoft didn’t really advise us on: what if we didn’t exactly have access to our SharePoint 2003 server? What then? Our 2003 environment was hosted externally, and in conjunction with SharePoint 2007’s release, our firm was getting larger and it was in our best interest to host it ourselves. So I went to the aforementioned website, and quickly found that the two simple “migration strategies” did not apply to us.

So how was I going to pull this off? Keep in mind, as I’ve gone on and on about in all my blogs, that SharePoint is really just a web application. And more importantly, all of its data is stored in SQL server. So a SharePoint migration really is just a big database backup / restore. The problem is that the tools we use and the way we need to use them is a bit convoluted. So here we go…

  1. Set up your 2007 environment, and create a new web application.
  2. Under Application Management in SharePoint Central Administration, go into the content database section for this web app, and delete the Content Database.  Trust me.
  3. Install / acquire a local SharePoint 2003 server.  
  4. Create a new virtual directory (which are now called web applications in 2007) in SharePoint Central Administration.  Make sure to use the same host headers as what your 2007 is named.
  5. Create a top level web site, but don’t browse to it to select a template.
  6. From this 2003 box, run the smigrate.exe utility against the externally hosted SharePoint site, and perform a backup operation.  There are only about half a dozen options to specify; just make sure to point to http://<your hosted site>.com.  This will create several files on your local server.
  7. Open up the hosts file (C:\Windows\System32\drivers\etc) and redirect the URL to the hosted site to your 2003 server’s IP address.
  8. Now, rerun smigrate.exe, except this time do a restore against your own local server, specifying the backup created in Step #6.  This will create an exact replica of your site on your local server.  Since we have the same host-headed URL, we don’t have to worry about broken links.  At this point, you can now perform one of the two standard SharePoint upgrades.  However, for my firm’s situation, this still wasn’t good enough; we wanted to keep our 2003 environment completely separate for some legacy projects.  So I will take you the rest of the way…
  9. On our 2007 box, update the hosts file like in Step #6 to point to the 2003 box.  Run the prescan.exe utility against it.  What this does is kind of “prep” the database to work with 2007.
  10. (Only if we need to run on the content database on a different database server.)  Launch SQL Server, and take a database backup of the content database.  Move this file to the new server, and do a restore.
  11. Remove the reference to the 2003 box in the hosts file.
  12. Fire up stsadm.exe (you knew we’d be using this) and run “addcontentdb.”  Stsadm.exe actually has decent documentation using the “?” switch; consult this for the exact switches and options to use for your server.  But basically you will be filling in the blanks for a connection string to our 2003 content database and a URL to the new 2007 web app.

And there you have it! Stsadm.exe will churn, and when it’s done, there magically will be your externally hosted 2003 SharePoint portal living comfortably in your local 2007 environment. I will leave you with some considerations of this migration strategy.

  • No user permissions will be carried over.  Since we are on different domains, this simply isn’t possible.  You’ll have to log in as your site collection administrator to get everything set up.
  • 2003 doesn’t have the concept of master pages and other look & feel options like 2007 has.  If things look funny, just set / reset the master page of the page or site.
  • As far as custom code goes, we did not have any custom web parts, smart parts, form library event handlers, web services, or third party tools installed on this site, so I can’t speak to how these will work under 2007.  I would suggest that the .NET Framework 1.1 be installed (if it already wasn’t) to support any legacy code.  You might also have to either reference the “old” Microsoft.SharePoint assembly in your projects, or convert them to 2.0 and use the "new" (12.0.0.0) Microsoft.SharePoint.  Regardless, your code should still compile, as this assembly does a good job of keeping all the old methods and objects around, and informing the complier of any obsolesce.  
  • We did have one issue of list data not coming over correctly:  
    • The list had user lookup columns, which now all say that the administrator created and modified everything.  
    • Some system dates were either null or reset to the time of the migration.
    • Versions of the list items did not come over.

2 Tags

No Files

No Thoughts

Your Thoughts?

You need to login with Twitter to share a Thought on this post.


Loading...