So, with my last post I talked about using smigrate to backup and restore your SharePoint sites. With this post I’m going to go one step further and attack a specific scenario that I seem to be getting more and more questions on – migrating your companyweb SharePoint site from on existing SBS 2003 installation to a new one. This may be because you’re swinging your SBS to new hardware, or just starting over for whatever reason.
The idea is quite simple – you have a working companyweb on your current SBS, complete with tons of documents in various document libraries, a few custom lists, maybe a forms library, etc. – you’re moving to a new server and you want to move that site completely in tact . . . it’s not an unreasonable request by any means – and luckily enough it is rather simple to accomplis - provided of course you know how to do it. That’s where this post comes in :^)
Obviously, the first step to making this happen is to backup your existing companyweb site using smigrate as I’ve outlined in my previous post. The restore part is where everyone seems to be stumbling, so here’s what you need to know:
First, it is important to understand part of what the smigrate restore does. When it connects to your SharePoint site to perform the restore, it is going to set the site template for the site based on the template that your backed up site was using. Now, with SharePoint – setting the template for a site is a one-time thing – once you’ve set a template for the site you can’t reset it. The only time a Sharepoint site is clean (e.g. does not have a template assigned to it) is right after Windows SharePoint Services has been extended to a website. The first time you access your new WSS site, you have to choose your template before you can begin using the site.
Most people who try to migrate their companyweb site using smigrate (or FrontPage) run in to this problem – their restore fails because the site is already in use. Specifically, the smigrate restore process cannot set the site template for the new companyweb site because it already has a template set. Sure, it’s the same template as the one you want to use – but the restore process still needs to set it to be sure. As a result, the restore fails before it ever gets started.
So – how do we get the restore to work? Simple – we take the new companyweb site back to a clean state (where no template has been set). To do so, we simply need to remove WSS from the companyweb virtual server, then re-extend it. Now, before we remove WSS from the companyweb virtual server (on the new SBS server) – you need to be aware that this process is going to destroy this site (and all content). Most of the time this should be an empty companyweb – but just in case you have some content in there, either extract it or back it up first :^). So – your step-by-step process to get your new companyweb in a state that will allow an smigrate restore: (all steps are on the new SBS – assuming you have already completed the smigrate backup on the old server and moved those files to the new server).
1) Open SharePoint Central Administration ( under Start | Administrative Tools )
2) Click on ‘Configure Virtual Server Settings’
3) Click on ‘companyweb’
4) Click on ‘Remove Windows SharePoint Services from virtual server’
5) Click to select ‘Remove & delete content databases’
6) Click OK to acknowledge warning that you are deleting all content for the site
7) Click OK
8) When you return to the SharePoint Central Administration page, click ‘Extend or upgrade a virtual server’
9) Click on ‘companyweb’
10) Click on ‘Extend and create a content database’
11) Select to ‘Use an existing application pool’
12) Verify that the app pool selected is ‘DefaultAppPool (NT AUTHORITY / NETWORK SERVICE)
13) Under the Site Owner section, enter the administrator email address for your domain
14) Click OK to extend WSS to the companyweb virtual server.
15) Once you see the page indicating the the virtual server was successfully extended, click OK to return the SharePoint Central Administration
16) Navigate to http://companyweb, and verify that you get the Template Selection page. Be sure and close this window – DO NOT click the OK button as this will apply a template to the site and you will have to repeat these steps before you will be able to restore your existing companyweb site.
At this point, your new companyweb site is in a clean state, and you can use smigrate to restore your existing companyweb backup to the companyweb on your new server. Now, if you were using any 3rd party web parts on your old server, you want to be sure and install those on the new server before starting your restore. And if this is a swing migration, your original AD will be in-tact, and the smigrate restore will also restore all permissions for the site as well. Once the smigrate restore process has completed, there is nothing left to do – your companyweb will be back exactly how you left it – all permissions, settings, templates, etc. will all be there and you’ll be good to go :^)