About Me

Hello, My name is Vishal Joshi,SharePoint Expert since 2009 and I work as a Senior SharePoint Administrator for WT. Kindly have a look at the posts and leave a comment if a post helped you.

2011-03-09

Export and Import a SharePoint Subsite

In MOSS, there are two new STSADM commands - import and export.The basic procedure to restore the subsite was to STSADM export the site to a file and then STSADM import it to new site collection's sub site.
 
Note:
The toplevel site is http://sspserver1:4500/ and the subsite is http://sspserver1:4500/Wiki/
 
Export subsite
stsadm -o export -url http://sspserver1:4500/Wiki/  -filename d:\DatabaseBackup\Wiki.bak -includeusersecurity
-versions 4
 
Import subsite
stsadm -o import -url http://sspserver2:4500/Wiki/  -filename d:\DatabaseBackup\Wiki.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.

No comments:

Post a Comment