Import a list or document library in SharePoint 2013
Applies to: SharePoint Server 2013, SharePoint Foundation 2013
Topic Last Modified: 2014-03-19
Summary: Learn how to import a site, list, or document library in SharePoint 2013.
You can import a site, list, or document library in SharePoint 2013 by using Windows PowerShell.
In this article:
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 lists or libraries, see Export sites, lists, or document libraries in SharePoint 2013.
Before you begin this operation, review the following information:
You can use importing as a method of restoring the items, or as a method of moving or copying the items from one farm to another farm. You can import a site, list, or document library 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 in SharePoint 2013.
You cannot import a site, list or document library exported from one version of SharePoint 2013 Products to another version of SharePoint 2013 Products.
|Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:|
You can use Windows PowerShell to manually import a site, list, or document library or as part of a script that can be run regularly.To import a site, list or document library by using Windows PowerShell
Verify that you have the following memberships:
securityadmin fixed server role on the SQL Server instance.
db_owner fixed database role on all databases that are to be updated.
Administrators group on the server on which you are running the Windows PowerShell cmdlets.
An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 Products cmdlets.
Note: If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.
Start the SharePoint 2013 Management Shell.
For Windows Server 2008 R2:
On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, and then click SharePoint 2013 Management Shell.
For Windows Server 2012:
On the Start screen, click SharePoint 2013 Management Shell.
If SharePoint 2013 Management Shell is not on the Start screen:
Right-click Computer, click All apps, and then click SharePoint 2013 Management Shell.
For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.
At the Windows PowerShell command prompt, type the following command:
Import-SPWeb -Identity <SiteURL> -Path <ExportFileName> [-Force] [-NoFileCompression] [-Verbose]
<SiteURL> is the URL for the site that you are importing to.
<ExportFileName> is the name of the file that you are exporting from.
Important: The site or subsite that you are importing must have a template that matches the template of the site specified by
You can also use the
Get-SPWebcmdlet and pass the ID to
Import-SPWebby using the Windows PowerShell pipeline. The value of the
Pathparameter specifies the path and file name of the file from which to import the list or library. To include the user security settings with the list or document library, use the
IncludeUserSecurityparameter. To overwrite the list or library that you specified, use the
Forceparameter. You can use the
UpdateVersionsparameter to specify how versioning conflicts will be handled. To view the progress of the operation, use the
NoFileCompressionparameter lets you specify that no file compression is performed during the import process. Using this 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
NoFileCompressionparameter in the
Export-SPWebcmdlet, you cannot use this parameter in the
Note: There is no facility in the
Import-SPWebcmdlet to import a subset of the items within the export file. Therefore, the import operation will import everything from the file.
For more information, see Import-SPWeb.
|We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.|