Had a situation recently where I needed to promote a subsite to a top level site. As STSADM backup/restore can only be used at the site collection level, a different approach was required.
As of WSS v3, there are two new STSADM commands - import and export.
The basic procedure to promote the subsite was to STSADM export the site to a file and then STSADM import it at the toplevel.
Here are the basic commands I used:
Export subsite
stsadm -o export -url http://toplevel/sub_site/subsite -filename c:\subsite.bak -includeusersecurity -versions 4
Import subsite
stsadm -o import -url http://toplevel/subsite/ -filename c:\subsite.bak -includeusersecurity
A couple of things to note:
The -includeusersecurity switch ensures that all the columns such as modifed by, created by are maintained.
The -versions 4 switch will ensure that all versions of list items/documents are exported.
You must import/export to sites that share the same template. So a team site can only be exported and imported into another team site. You will know you are trying to import into non matching templates if you get the following error:
"The exported site is based on the template STS#1 but the destination site is based on the template STS#0"
This means that a site based on the blank template is trying to be imported into a site based on the team template. To my knowledge there is no easy way of changing a sites templates.
The following lists some of the common WSS templates:
Team Site | STS#0 |
Blank Site | STS#1 |
Document Workspace | STS#2 |
Wiki Site | WIKI#0 |
Blog | BLOG#0 |
8 comments:
Thanks for this, was exactly the information I needed to promote a site.
Yeah, thanks! Concerning the site template: I had no problem to import a site into another configuration of the same site definition, i.e. I was able to import into a "blank site", while the original site was a "team collaboration site".
Thanks a lor, Drewberry!
Hey Anonymous guy!
I tried to import a "blank site" to a "document workspace" site and it didn't work. I received a warning that the templates are not the same and the import it's not possible. Probably it allows you to import any type of site to a "blank site", but not the other way.
Great Blog info.
I need more help on SharePoint. Will you answer a question for me?
The users on the SharePoint site collection are getting repeated request for their credentials whenever they try to edit a document. I can't figure out how to fix it. I have searched everywhere and have not found an answer. Please Help me.
Side Note: My brother and husband are both Eagle Scouts from Quapaw (sp).
I found a way to fix the template issue while importing:
http://www.mysharepointsupport.com/2010/05/23/sharepoint-error-cannot-import-site/
Regards!
Thank you, very helpful
Very Good, exact information provided to move sub sites to new site
Post a Comment