Thursday, 2 August 2018

Import and Export in SharePoint

Import and Export List
----------------------------
Export from Server
-----
Export-SPWeb "http://my.local/sites/CQT User Forum/IssueReporting" -itemurl "Lists/CQT%20Requests%20%20Issues" -path "c:\temp\backup\test2.cmp" -IncludeUserSecurity -IncludeVersions All -Force

Import List to Server
-------
Import-SPWeb "http://myuat.corp.com/sites/CQT User Forum/IssueReporting" -Path "D:\Rajesh\backup\test2.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -Force

Import List
----------------------
Import-SPWeb "https://de.web.com/sites/in/news/" -Path "D:\INNews\innews.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -Force -verbose

If above command throws error Like Survey list or library exist,
1. Remove the subsite.
2.Create the subsite with no Template ID (command to create New-SPWeb http://somesite/subweb1) (Don't create site with any template or UI)
3. Run the Import command again.

No comments:

Post a Comment