Breaking out SharePoint sub-sites as top level sites

I have multiple sub-sites running under a top level site that I want to ‘break out’ and have them as a top level site.

Can this be done?  How?

Does each of the ‘new’ top level sites need their own content database/application pool?

In line with q.3, can I have multiple top level sites running under one application pool/content database?
xmouserAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

irinucCommented:
Hi,
If you are on MOSS from command prompt use stsadm -export to backup the subsite and then stsadm -import to restore it to the new top-level site.
However you should take into consideration the size of the subsites, as this tool sometimes fails on large sites.

Or you could try a tool like AvePoint (http://www.avepoint.com).

Also, you should take into consideration if you want to keep the same path - then you need to create managed paths (and if the number increases considerably that is not always a good idea).

Q2: It is up to you if you want to put in different content databases - again I believe the size would provide the answer - if the size is small (less than 1 GB for example per site) then no need to have different content databases.
Q3: You do not need different application pool.
You could definetely have multiple top level sites.

Just to clear one thing: by top-level sites you refer to different site collections?
With paths like http://server/sites/s1, http://server/sites/s2, etc.

Hope this helps.
0
xmouserAuthor Commented:
'If you are on MOSS from command prompt use stsadm -export to backup the subsite and then stsadm -import to restore it to the new top-level site.'
It can be used for top-level sites AND sub-sites but you can't break out sub-sites with the command.
0
xmouserAuthor Commented:
Per Microsoft:

Use the Stsadm.exe command-line tool only to back up and to restore top-level Windows SharePoint Services Web sites.

The Stsadm.exe command-line tool does not back up or restore individual subsites in a top-level Windows SharePoint Services Web site.
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

irinucCommented:
What version of SharePoint you have?

I am referring to MOSS 2007.
Indeed stsadm backup/restore does not work on sub-sites. This is the alternative and it definetely works on backing up the sub-site and then restoring as top-level site. (stsadm export/import)
http://technet.microsoft.com/en-us/library/cc262465.aspx 

Sorry if this was not what you needed.
0
xmouserAuthor Commented:
Nothing on that link refers to exporting a sub-site and restoring it as atop-level site.

How do you get only the sub-sites?
If you use -url http://topleve/sub-site you get the top level site and the sub-site.

http://sub-site doesn't work.


0
irinucCommented:
That link is providing the correct syntax; and there is nothing in there that specifies that it is restricted to only top level sites or sub-sites.

Here is the exact syntax I used:
stsadm -o export -url http://full_path_to_the_subsite -filename g:\sitebackup
My full path is something like http://ServerName/Sites/Top_Level_Site/SubSite

And to import it, I first create the top-level site from Central Admin (it may work without creating first the site, but i preffer to do it this way):
stsadm -o import -url http://ServerName/Sites/New_Top_Level_Site -filename g:\sitebackup.cmp

Hope this helps
0
xmouserAuthor Commented:
Hmm, I'll try it in the morning.
0
irinucCommented:
Just to make sure you have this information, in case you run it on a larger site: the tool will create temporary files about twice as large as the site total size, so either make sure you have enough space on C drive, or before running the command move the Temp files to a drive where you have sufficient space.
0
RemixkiddCommented:
http://stsadm.blogspot.com/2007/09/convert-sub-site-to-site-collection.html

This tool is alittle more precise but there are still issues with doing conversions like this.

Also you could use this tool:

http://spdeploymentwizard.codeplex.com/Wikipage
0
xmouserAuthor Commented:
irinuc:

I use .bak for the file extension, again per Microsoft.  I see you have .cmp.  You have to give the file name an extension.
0
irinucCommented:
If you use no extension it will create the file with cmd extension, by default.
I included the exact syntax that I used.
0
xmouserAuthor Commented:
OK
0
xmouserAuthor Commented:
I created a top level site - no errors in event viewer.  I get: 'the file cannot be imported because its parent web does not exist' on import.
0
irinucCommented:
From the message I think of a syntax issue. What syntax did you use on import?

Should be something like:
stsadm -o import -url http://server/sites/url_of_new_top_level_site -filename ....
0
xmouserAuthor Commented:
I'm logged in as site admin/farm admin

stsadm.exe -o import -url http://<newsite> -filename d:\<exported_file>.cmp

I have tried with stsadm.exe -o imprt http:<servername>/<newsitename> -filename d:\<exported_file>.cmp

I get web application could not be found.
0
irinucCommented:
You should use full path to the site.
Usually this is http://servername/sites/newsite

Try opening the site created. Get the Full Path from the browser Address bar and remove
/default.aspx
This should be it.
0
xmouserAuthor Commented:
Try opening the site created. Get the Full Path from the browser Address bar and remove
/default.aspx
*I did, same result.

stsadm.exe -import -url http://<myservername>/sites/<newsite> -filename d:\<exported_site>.cmp

The web application could not be found.

I am running on port 8801 for this site and I have appended it to the above syntax but I get the same result.
0
irinucCommented:
So, when you type in your browser something like this:
http://servername:8801/sites/newsite
the site opens with no problems, but when you try the exact same thing for import it fails, am i understanding correct?

All your sites run on 8801? Or just this one?
0
xmouserAuthor Commented:
This is the only one on 8801.  I originally had it on 80 but iis continually stopped the site with the warning that another site had 80.

I did not use /sites when I set the application up.  I never have.  To get to any website I type:

http://websitename/default.aspx.  I was just trying /sites because it was mentioned.  If I go to:

http://<newsite>/degault.aspx the site opens fine.  This is the same syntax I typed in for the import.
0
irinucCommented:
It is most unclear to me what your farm configuration is and how you created this newsite.
However, it should not be the same syntax as you used for export, as this is a new top-level site while at export it was a subsite.

I will give you the example I used.
My initial site collection was http://servername/sites/irinuc
The subsite that i wanted to move as top-level site was http://servernaem/sites/irinuc/subsite
I did the export as I already mentioned.

Then, in Central Administration page I created a new Site Collection (in the same web application running on port 80). This new site collection is http://servername/sites/newirinuc
Then imported from the backup using stsadm -o import -url http://servername/sites/newirinuc -filename...
0
xmouserAuthor Commented:
I just want to be clear.  So if my old site was http://mycompany/mike/default.aspx  I need to import it as mikenew, mike2 or something else?

stsadm.exe -o import -url http://mikenew -filename d:\mike.cmp

In your Site Collection though wouldn't you extend the web application to have the new top level site name rather than a new site collection?
0
irinucCommented:
Yes, you are correct, you need to give it a new name.

I do not see an advantage of using an extended web application in my case. Using different Site Collections works very well for me.
0
xmouserAuthor Commented:
What I don't understand is the error I'm getting is:
The file cannot be imported becasue its parent web /mike does not exist.

Deleted application pool.  
Created new one: newmike
Site Collection: newmike

Connected to it - I can see newmike

stsadm.exe -o import url http://newmike -filename d:\newmike.cmp

The same error as above:  The file cannot be imported because its parent web /newmike does not exist.
0
irinucCommented:
Do you have a managed path named / in your web application?
I read on another experts-exchange question that someone got this error because the managed path did not existed.
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_23222476.html
0
xmouserAuthor Commented:
My web application reads: http://newmike

In managed paths:
(root) explicit inclusion
site - wildcard inclusion
0
irinucCommented:
I don't have other ideas.

I would however, try to restore in a new site collection (at least as test). Then, if this is working, I believe we may conclude that it is caused by the fact that you are trying to restore as a root site in the web application (i admit, i never tried that).
If is restoring fine in a new site collection, you can then try to use stsadm -o backup/restore to this new web application.

Sorry, that's all i've got.
0
irinucCommented:
Actually, i tried that on my environment and it worked just fine.
Created new web app - port 9999
Created new site colletion - http://servername:9999
Imported the backed up site - stsadm -o import -url http://servername:9999 -filename c:\irinuc.cmp

No errors, everything worked ok.
0
xmouserAuthor Commented:
I created a new site collection - several actually.  Same error.

I've created using port 80 and another random port - Same error.

I've been trying to get this site as root site for the web application.  How else coud it be a top level site?  I need the 'new' (backed up site of http://mike/oldsite) to have a URL of ex: http://newsite.  I need it to have it's own content database and top url.

0
irinucCommented:
Actually a top-level site is the root site of a site collection.
And you can put site collections in different content databases by restricting the number of sites that can be stored in the database, not necesarily by creating new web applications.
0
irinucCommented:
one last comment:
You said "I'm logged in as site admin/farm admin", this site admin has sql perms, right?

0

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
xmouserAuthor Commented:
Yes

'we may conclude that it is caused by the fact that you are trying to restore as a root site in the web application'

How are you restoring yours? If not as a top level site - root site of a site collection, where?
0
xmouserAuthor Commented:
Nothings worked - still not sure why I do appreciate the help from irinuc.
0
irinucCommented:
I do believe that you should not give the points if this didn't work for you.
I provided a tested solution that worked for me; there may be better alternatives for your environment.

From my part, please feel free to close the question with no solution.
0
xmouserAuthor Commented:
No, you went above and beyond the call of duty.  There's a lot's of great info there.  I've stood up a test server and I'm going to test this again.
0
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.