Skip to main content

Thinking out aloud - Dave Hunter's SharePoint Blog

Go Search
Home
Blog
  

Locations of visitors to this page


 Useful Links

  Microsoft UK events
  SharePoint 2007 on CodePlex
  SharePoint Community Portal
  SharePoint User Group
  SharePoint Community Portal
  SharePoint Pedia
  SharePoint MSDN Forums
  SharePoint University
Home > Thinking out aloud - Dave Hunter's SharePoint Blog > Posts > STSADM Import / Export
My thoughts and findings on Microsoft Information worker technologies, including MCMS and SharePoint 2007 (MOSS).
STSADM Import / Export
STSADM has two operations called "import" and "export".

Export allows you to backup a copy of a site to the file system. This will generate one or more .CMP files (based on the size of the site, this will distribute the contents over many .CMP files).

Import allows you to take the files generated by an export and import over a blank SharePoint Site.

Please note: Both Import and Export operations for STSADM deal with an entire site. You can not export or import individual items such as lists or items.

I used Import / Export during a migration to restructure the sites. Basically I had a collection of WSS sites for active projects and a collection of WSS sites for archive projects which weren't logically organised. I wanted to introduce a level for the active projects and another level for the archive projects. I created these levels (active and archive) in SharePoint through the standard create site function. I then need to move the archived sites under archive and active under the active site. This process is often referred to a re-parenting. I did this using STSADM and the Export operation and the Import operation (see below).
 
STSADM -o export -url http://localhost/ProjectSite1 -filename c:\export\ProjectSite1 -includeusersecurity
STSADM -o createweb -url http://localhost/Archive/ProjectSite1
STSADM -o import -url http://localhost/Archive/ProjectSite1 -filename c:\export\ProjectSite1.cmp -includeusersecurity
 
Please note: By using the parameter "includeusersecurity" it preserves the current user, rights for the site. This is an optional parameter, but very useful.

The createweb operation creates a blank site for the import to write the contents of the export over. You shouldn't specify a sitetemplate as you just need a blank container (the template is defined in the export .CMP files).

STSADM is a command line tool, so you could wrap these commands in a batch file.

Please see my post about errors when using the Import / Export commands here.
  Copyright
This work is licenced under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 UK: England & Wales License
  Site Map

Comments

There are no comments yet for this post.

 Dave Hunter

I'm currently a Senior Consultant at Netstore 2e2. I specialise in Microsoft Information Worker technologies (especially MOSS, MCMS and .NET), with over 8 years of experience within this area of specialism. 

I have gained two certifications for MOSS and WSS and look to complete the full certification track soon.

View Dave Hunter's profile on LinkedIn

  Subscribe in a reader


 Latest Posts

I’ve been Awarded a MVP for SharePoint01/04/2010 19:49
SharePoint 2010 Training on Microsoft E-Learning15/03/2010 17:56
SharePoint UK User Group - Thursday 27th August London Meeting25/08/2009 17:56
CAML Query that filters on the current user23/07/2009 17:50
Microsoft Ramp Up Free SharePoint Developer Training22/07/2009 20:59
How To: Change a SharePoint Application Pool Programmatically07/07/2009 18:08
SharePoint Forums Topping 100 Answers06/07/2009 12:29
Find out the SharePoint Internal Name for a Column or Site Column28/05/2009 09:56
Delving into Deploying SharePoint Artifacts with Features24/04/2009 15:20
SharePoint - Connecting MySites with the Portal24/04/2009 14:39
1 - 10 Next