Consolidating Site Collections After Upgrading SharePoint

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

Published Tue, Nov 14 2006 3:35 by Shane
Filed under: ,

Comments

# Consolidating Site Collections After Upgrading SharePoint

Wednesday, November 15, 2006 9:37 AM by SharePointKicks.com

You've been kicked (a good thing) - Trackback from SharePointKicks.com

# re: Consolidating Site Collections After Upgrading SharePoint

Wednesday, January 10, 2007 9:45 PM by Marcus Hooper

I would just suggest that people make note of the -includeusersecurity option for both the export and import. Definitely save some headaches.

# re: Consolidating Site Collections After Upgrading SharePoint

Tuesday, January 23, 2007 9:24 PM by Josh

Shane,

I'm getting an error when exporting some sites saying "User cannot be found". I'm the site collection owner and i'm added as a full control user for the site i'm exporting?

Any Ideas?

# re: Consolidating Site Collections After Upgrading SharePoint

Wednesday, January 31, 2007 6:49 PM by Joel Rumerman

Awesome. Simply awesome...

I was playing with this for a while with no success. The trick (for me at least) is to not create the import site location and let the import process create it for you. Otherwise, you'll get template mismatches.

Thx, Joel

# re: Consolidating Site Collections After Upgrading SharePoint

Friday, February 02, 2007 3:08 PM by Farzin Davari

It was awesome, Thanks Shane.

# re: Consolidating Site Collections After Upgrading SharePoint

Friday, February 23, 2007 3:35 PM by Krish

even, I'm getting an error when exporting some sites saying "User cannot be found". I'm the site collection owner and i'm added as a full control user for the site i'm exporting?

Any Ideas?

# re: Consolidating Site Collections After Upgrading SharePoint

Wednesday, March 14, 2007 2:40 PM by Farzin Davari

Hi Shane,

Do you have any idea if export and import might affect Alert?

I have upgraded a SPS 2003 to 2007 (In place upgrade) and then in order to re structure the sites in MOSS, I used export/import command. Aparently Alert stopped working after import/export.

Any idea?

Thanks

Farzin

# re: Consolidating Site Collections After Upgrading SharePoint

Wednesday, June 20, 2007 1:12 PM by Paze

btw - screen shots are brkn imgs

# re: Consolidating Site Collections After Upgrading SharePoint

Friday, June 29, 2007 10:22 AM by Len

Very nice description and clear instruction. Great job.  We were trying to do something similar, move a Site collection \sites\site1 under another site collection \sites\Site2\Site1. All of which came from SP2k3. Finally discovered that we had to manually create a 'blank' site under \sites\Site1\ before the import and all worked out.  Thanks for your contribution to the SP community!

# Importing SharePoint sites programmatically (Not documented)

Monday, August 06, 2007 3:48 AM by itaysk

It all started after a simple migration from SPS2003 to MOSS2007. As you know, sites created under the

# re: Consolidating Site Collections After Upgrading SharePoint

Wednesday, August 15, 2007 10:56 AM by chris

when i tried export/import all document libries were set to same date.  this included infopath forms.  anybody have this problem?

# re: Consolidating Site Collections After Upgrading SharePoint

Sunday, December 23, 2007 2:30 AM by BASEL

I have upgraded a SPS 2003 to 2007 (In place upgrade) and then in order to re structure the sites in MOSS, I used export/import command.

Not all my docuemnt under the sites have been moved (exported/imported) although the message was that the operation successfully done.

# re: Consolidating Site Collections After Upgrading SharePoint

Sunday, March 23, 2008 6:26 PM by Martin Norland

Just a fair warning to folks - and to answer Farzin Davari... alerts, workflows, and some properties are lost with the stsadm import/export process (in its current incarnation as of this writing) - this is largely due to the fact that the GUIDs are not preserved - and new GUIDs are created as items are created/moved.

This is, however, a Good Thing (tm) if you're moving content within a content database, otherwise you'd be wreaking havoc with duplicate GUIDs.

As for 'not all documents coming across', you almost certainly wanted to specify "-versions 4" to get all versions of your files, not just current/published ones.  -includeusersecurity is generally a must as well if you're intending to use content with the same users / in the same manner.

# re: Consolidating Site Collections After Upgrading SharePoint

Tuesday, May 20, 2008 1:00 PM by TJAN

Can the export/import functionalty be used as a migration tool? I am tyring to find an option to the backup/restore which will not include security.

# Soma buy soma cheap soma soma online.

Friday, June 12, 2009 10:06 AM by Buy soma.

Buy soma tablets. Buy soma www scantips com buy soma online. Soma soma buy soma soma online. Buy soma. Buy soma bloghoster. Http pills.viptemplates.com p buy soma.

# re: Consolidating Site Collections After Upgrading SharePoint

Sunday, October 10, 2010 11:35 PM by Khoi Le

Hi all,

I have some problem with import SP site:

I have finished export a site to a file successfully (ex: backup.dat)

When I import this file (backup.dat) into the same site collection, it's worked Ok.

But when I import this file into the other site collection, an error has occurred: "Could not load file or assembly...". It's not copy assembly file into bin folder of port(s) which I want to import.

Please show me how to resolve that problem!.

Thanks a lot!.

KhoiLe  

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: