Is it possible to convert a sub site to a new site collection's top site in SP 2007?

We're using MOSS 2007

For instance, say I have these sites:

And each one of those subsites has sites.
Is it possible to take "" and create a new site collection based off of that, called ""?  I'm going to need all the content to come over too, so any and all subsites under there would need to come over as well (,, etc).

Is there a way to do this without purchasing 3rd party tools, while still keeping data?  I understand any non-relative URL paths will be broken, and that's to be expected.

I'm mainly concerned with data integrity - If i have to go around and fix some links, that's fine.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe KlimisCommented:
You can use stsadm export utility , for the full syntax see the link below , try the following.
( i find the nofilecompression works fatser if you have plenty of disk space )

stsadm -o export -url -filename c:\backup.dat -overwrite -includesecurity -nofilecompression

the syntax for an an import is:

stsadm -o import -url tp://  -filename c:\backup.dat

I hope this helps

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Your terminology is wrong, I believe.

"" is a top level sites (typically, /sites/sitename is top level site).

"" would be a subsite of, which I assume is a top level site.

So in your example you are actually moving a top level site to a subsite. At any rate, use the stsadm -o export/import to move subsites to top level sites and vice versa.
ThatSharepointGuyAuthor Commented:
Thank you, I failed to notice that i had that written wrong.  I hadn't had my coffee yet :)
The sub site that gets promoted to a top level site will be the top level site in it's own Site Collection and Content Database.
So I want to extract a subsite from the main site, and then restore it to a new site collection with it's own content database.
Would that still work?  I wasn't sure if stsadm could restore a site that was previously a sub-site, to be the top level site in a new site collection connected to a new content database.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Yes it's possible.

Use the stadm -o export/import to promote your subsite to a top level site collection. Create the top level site collection using the same template as the subsite before you actual restore using the import command.

Once u have your top level site collection, u can use the stsadm -o mergecontentdb to split the site collection to it's own contentdb. I'll provide a link with good instructions for this later
here is a good tutorial on using the mergecontentdb command -

Actually, you can just add your new content db first and then create your new site collection (on new contentdb) and then use the stsadm -o import command. If you go this route, set a limit on the number of sites your existing contentdb can support, so that when you create your new site collection it will be created on the new content db. Then afterwards adjust the site limit back to the original.

ThatSharepointGuyAuthor Commented:
Unfortunately, that link to isn't coming up for me, on three windows boxes here in the office.  I'll check from home when I get there.
ThatSharepointGuyAuthor Commented:
Nope, it didn't work at home last night either.
Are you sure that link is active (ie - not dead, the site didn't move, etc?)
Strange, I am 100% positive the link works.

The link isn't that important. Like I stated, you can add your new content db first, create your new site collection on the new content db, then restore the subsite to the new site collection and forget about the -o mergecontentdb command.
ThatSharepointGuyAuthor Commented:
That is indeed strange...I just tried the link again and it came up.   It took a few moments, but it loaded.  Perhaps his site was down yesterday?  Coming from a military network, I thought that it might have been blocked, however that didn't explain the issue from my house.  

Oh well, as you said, it's not that important.  I'll try what you advised, just as soon as I get my test environment back up.

I'll go ahead and assign points now though - there's no need to make anyone wait :)

Thanks Quihong!
ThatSharepointGuyAuthor Commented:
Thanks guys.  No need to make you wait while I rebuild my test environment at home :)  Thanks for the awesome link, Quihong!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.