Link to home
Start Free TrialLog in
Avatar of xmouser
xmouserFlag for United States of America

asked on

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?
Avatar of irinuc
irinuc
Flag of Romania image

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.
Avatar of xmouser

ASKER

'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.
Avatar of xmouser

ASKER

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.
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.
Avatar of xmouser

ASKER

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.


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
Avatar of xmouser

ASKER

Hmm, I'll try it in the morning.
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.
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
Avatar of xmouser

ASKER

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.
If you use no extension it will create the file with cmd extension, by default.
I included the exact syntax that I used.
Avatar of xmouser

ASKER

OK
Avatar of xmouser

ASKER

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.
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 ....
Avatar of xmouser

ASKER

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.
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.
Avatar of xmouser

ASKER

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.
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?
Avatar of xmouser

ASKER

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.
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...
Avatar of xmouser

ASKER

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?
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.
Avatar of xmouser

ASKER

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.
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.
https://www.experts-exchange.com/questions/23222476/Getting-an-error-like-The-file-cannot-be-imported-because-its-parent-web-sitename-does-not-exist-while-importing.html
Avatar of xmouser

ASKER

My web application reads: http://newmike

In managed paths:
(root) explicit inclusion
site - wildcard inclusion
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.
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.
Avatar of xmouser

ASKER

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.

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.
ASKER CERTIFIED SOLUTION
Avatar of irinuc
irinuc
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xmouser

ASKER

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?
Avatar of xmouser

ASKER

Nothings worked - still not sure why I do appreciate the help from irinuc.
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.
Avatar of xmouser

ASKER

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.