Click to Rate and Give Feedback
TechNet
TechNet Library
Office
Technical reference
Stsadm operations
 Import: Stsadm operation
Import: Stsadm operation (Office SharePoint Server)

Updated: 2007-03-22

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

URL of the Web application 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:

  1. Add new versions to the current file (default)

  2. Overwrite the file and all of its versions (delete then insert)

  3. Ignore the file if it exists on the destination

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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
-haltonfatalerror      Shai Petel ... Thomas Lee   |   Edit   |   Show History
The process stops on every fatal error, this switch is useless.
FatalError: The given key was not present in the dictionary      I_am_Raja ... Kirk Stark - MSFT   |   Edit   |   Show History

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.

FatalError: The given key was not present in the dictionary      sharepointman   |   Edit   |   Show History
Did anyone find a solution to this issue? I am also getting this type of error but it only happens with images that were exported/imported. The message also seems to indicated something about the blobcache. I have the blobcache enabled and am wondering if this might be part of the problem.
FatalError: Object reference not set to an instance of an object.      pgprakash1980 ... Thomas Lee   |   Edit   |   Show History
Hi,

I am getting the following error when using import command.

Please update me if you find any solutions on this.

Progress: Importing Folder /sites/factbook-1992-2002/myweb/_derived.
FatalError: Object reference not set to an instance of an object.
at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
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()
  

[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&


Duplicate Lists After Import      omecker   |   Edit   |   Show History

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.

Problems with new lists created after import      Vicki Dillon   |   Edit   |   Show History
FYI. There is a bug in some versions that after import of a site, newly created lists can create new and delete items but not edit them; even for site admin. The item edit form yeids "Access Denied".
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
The file cannot be imported because its parent web does not exist.      Leonid Fofanov   |   Edit   |   Show History
To avoid getting a fatal error "The file cannot be imported because its parent web <site path> does not exist" run import command under the site collection administrator account.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker