As you start to explore Microsoft Office SharePoint Server 2007 you are going to find lots of new features and ways of doing things. One that has caused a bit of stir in the upgrading classes I have taught (to roughly 60 people already WOW!) is the fact that when you create a site through the site directory it becomes a sub site, not a separate site collection as it did in SPS 2003. My understanding of the reasons behind this is the rollup and aggregation web parts do not work across site collections. Also, the handy feature Manage Content and Structure is only valid within the same site collection. So that is great for new sites you create but what about when I upgrade?
In SPS 2003 all of our sites created from the site directory were separate site collections. So when we finish upgrading we are left with 1 site collection that encompasses our portal (and future sites we create from the portal) and then all of these upgraded collaborative sites that live each in its own site collection. What are we to do?
Well, thanks to some persistent students in my Denver class last week I have sat down and figured out how to rearrange things if you are so inclined. (Ok, ok I actually sent an email and had the answer sent to me but such is life, at least I am going to document it. Thanks Joel)
So just a couple of basics before we start.
- My portal is located at http://portal.abc.local
- I have a team site (standalone site collection) located at http://portal.abc.local/sites/hr
If I wanted to see a list of all of the site collections below my portal I can do that. The easy, out of the box way is to use stsadm.exe –o enumsites –url http://portal.abc.local
You will also notice from the screen shot that stsadm gives us more details in this version. ContentDatabase, StorageUsedMB, StorageWarningMB, and StorageMaxMB are all new pieces of information that could be handy in a pinch.
Anyway, back to the task at hand. How are we going to move HR to be part of the portal site collection? How about using stsadm.exe –o export
From the screen shot we can see at a minimum we will need to use the –url and –fliename options. So we probably want to run stsadm –o export –url http://portal.abc.local/sites/hr -filename HRsite.bak
Depending on the size of your site collection this command may run for several minutes. Once it finishes you will get a message saying Operation Completed Successful. Now we need to figure out how to get the site collection back in. To do this let’s look at the command stsadm –o import
From this screen shot we can now see that we just need to do is import our previous file to a url inside our portal site collection. Something like stsadm –o import –url http://portal.abc.local/HR -filename HRsite.bak
Once again you should get a Operation Completed Successfully message. If you did then you should now be able to browse to http://portal.abc.local/sites/hr. Now don’t forget to also go back and manually deleted your old site collection http://portal.abc.local/sites/hr once you are sure you have successfully moved everything. I will leave how to delete to you. It always scares me to give out instructions on deleting things because you never know who might only half way read this article and mindlessly delete something on accident. It happens!
Once you finish all of this moving around you will need to do a little navigation cleanup but nothing we can’t do through site settings these days.
Shane SharePoint Help