Import: Stsadm operation (Office SharePoint Server)
Updated: April 29, 2010
Applies To: Office SharePoint Server 2007
Updated: 2010-04-29
Operation name: Import
Imports site and subsite data from your Microsoft Office SharePoint Server 2007 installation.
Syntax
stsadm -o import
-url <URL name>
-filename <import file name>
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-updateversions] <1-3>
[-nofilecompression]
[-quiet]
Parameters
| Parameter | Value | Required? | Description |
|---|---|---|---|
|
url |
A valid URL, such as "http://server_name" |
Yes |
Specifies the URL of the site collection or site to be imported. In SharePoint 2010 Products, specifies the URL of the site collection, site, or list to be imported. |
|
filename |
If using the –nofilecompression parameter, a directory must be specified; otherwise, any file format is valid. |
Yes |
Name of the import file |
|
includeusersecurity |
<none> |
No |
Preserves the user security settings |
|
haltonwarning |
<none> |
No |
When a warning occurs, the export process is stopped. |
|
haltonfatalerror |
<none> |
No |
When an error occurs, the export process is stopped. |
|
nologfile |
<none> |
No |
Suppresses the generation of an export log file. If this parameter is absent, the import operation will generate an import log file in the same location as the import package. The log file uses Unified Logging Service (ULS). It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log file. |
|
updateversions |
Any one of the following versions:
|
No |
Indicates how to resolve situations where a file to be imported to a site already exists in that site. If the -updateversions parameter is absent, the import operation will default to using a value of 1. |
|
nofilecompression |
<none> |
No |
Either enables or disables file compression in the import package. The import package is stored in the folder specified by the -filename parameter. It is recommended to use this parameter for performance reasons. If compression is enabled, it can increase the import process by approximately 30%. |
|
quiet |
<none> |
No |
Suppresses the output of import progress information to the display window. The final import status (“Operation completed successfully.”) will still be displayed. If the -quiet parameter is absent, the import operation will display progress information to the display window as it imports a package. For performance reasons, it is recommended to use this parameter because the buffer of the display window is small compared to writing a file. |
The Web application at http://server/test could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing
content, the system administrator may need to add a new request URL mapping to the intended application.
Here is my import command:
stsadm -o import -url http://server/test -filename c:\sharePointBackup\test.bak -includeusersecurity
The -url destination does exist. I've tried pointing this to a brand-new (empty) sub-site, as well as an existing site. Help appreciated!
[tfl - 30 05 10] Hi - and thanks for your post.You should post questions like this to the Technet Forums at http://forums.microsoft.com/technet or the MS Newsgroups at http://www.microsoft.com/communities/newsgroups/en-us/. You are much more likely get a quick response using the forums than through the Community Content. For specific help about:
Exchange : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.exchange%2C&
SQL Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C&
Windows : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows%2C&
Windows Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows.server%2C&
Virtual Server : http://groups.google.com/group/microsoft.public.virtualserver/topics?lnk
Full Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C&
- 2/25/2010
- Tonto18911
- 5/30/2010
- Thomas Lee
- 11/17/2009
- Leonid Fofanov
Here is a blog entry on the problem and solution http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/4d0578f8-f6f2-480a-8a63-737ac102cf98
- 11/10/2009
- Vicki Dillon
I am using the stsadmin export/import process to migrate content between a WSS test site and a WSS production site. When I do the import, the existing lists don't get deleted and then I end up with duplicate lists and the application errors out and refuses to load. If I go in and manually delete all of the old lists (leaving the new lists intact), the site comes up fine. This tells me that the import worked, but it doesn't clean up by deleting duplicate lists. I've tried various switches (including -updateversions 1 and 2). Does anyone know how I can get the lists to delete and recreate or be overwritten by the import?
Thank you kindly for your assistance.
- 5/8/2009
- omecker
[tfl - 13 01 09] You should post questions like this to the Technet Forums at http://forums.microsoft.com/technet or the MS Newsgroups at http://www.microsoft.com/communities/newsgroups/en-us/. You are much more likely get a quick response using the forums than through the Community Content.
For specific help about:
Exchange : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.exchange%2C&
SQL Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C&
Windows : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows%2C&
Windows Server : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.windows.server%2C&
Virtual Server : http://groups.google.com/group/microsoft.public.virtualserver/topics?lnk
Full Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C&
- 1/13/2009
- Gnana Prakash - SharePoint Specialist
- 1/13/2009
- Thomas Lee
- 10/14/2008
- sharepointman
We keep getting this error whenever we try to import a subsite from one instance to another. We are making a copy of our production site into a testing site, we are not able to complete the import process due to this error.
Any idea's on this?
FatalError: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.SharePoint.Deployment.ImportObjectManager.GetMappedRole(SPWeb web, Int32 ridIn, Int32& ridOut)
at Microsoft.SharePoint.Deployment.RoleAssignmentsImport.ProcessComplexElement(ImportStreamingContext context, XmlReader xr, SqlSession session)
at Microsoft.SharePoint.Deployment.SqlBatchImport.Run()
at Microsoft.SharePoint.Deployment.SecurityObjectSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObjectDirect(Object objParent, Type objectType)
at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
at Microsoft.SharePoint.Deployment.SPImport.Run()
[ks-Aug12 2008]-You should post questions like this to the Microsoft Discussion Newsgroups at http://www.microsoft.com/communities/newsgroups/en-us/. You are much more likely get a quick response using the forums than through the Community Content.
- 8/4/2008
- I_am_Raja
- 8/12/2008
- Kirk Stark - MSFT
- 8/1/2008
- Shai Petel
- 8/2/2008
- Thomas Lee