Import a site, list, or document library (Search Server 2010)
Published: May 12, 2010
You can use importing as a method of restoring items or as a method of moving or copying the items from one farm to another farm. You can import a site, such as a Search Center site from a backup of the current farm, from a backup of another farm, or from a read-only content database. To import from a read-only content database, you must first attach the read-only database. For more information, see Attach and restore a read-only content database (Search Server 2010).
Although you can use either Windows PowerShell or Central Administration to export a site, list, or document library, you can use only Windows PowerShell to import a site, list, or document library. For information about how to export sites, lists or libraries, see Export a site, list, or document library (Search Server 2010).
You cannot import a site, list or document library exported from one version of Microsoft Search Server to another version of Search Server.
Import a site, list or document library
You can use Windows PowerShell to manually import a site, list, or document library or as part of a script that can be run at regular intervals.
To import a site, list or document library by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
In the SharePoint 2010 Management Shell, at the Windows PowerShell command prompt, type the following command:
Import-SPWeb -Identity <ID> -Path <FileName> -Verbose -Force -NoFileCompression
<ID> is URL or GUID of the site, list, or library.
<FileName> is the Universal Naming Convention (UNC) path and file name of the file from which to import the site.
This command overwrites the site that you specified because it uses the Force parameter. Using the NoFileCompression parameter can lower resource usage up to 30% during the export and import process. If you are importing a site, list, or document library that you exported from Central Administration, or if you exported a site, list, or document library by using Windows PowerShell and you did not use the NoFileCompression parameter in the Export-SPWeb cmdlet, you cannot use this parameter in the Import-SPWeb cmdlet.
There is no facility in the Import-SPWeb cmdlet import a subset of the items in the export file. Therefore, the import operation will import everything from the file.
For more information, see Import-SPWeb.
If you do not use the Verbose parameter, the Command Prompt window displays no message if the operation succeeds. If the job does not finish successfully, the Command Prompt window displays an error message such as the following:
Import-SPWeb: <Error Message>. At line: <line> char:<column>. + import-spweb <<<< < parameters>
If there are errors or warnings, or if the operation does not finish successfully, review the <File Name>.import.log file.