Reputation: 23
I have storage issue with my existing site collection which has 11 sub-sites now I created new site collection and I'm trying to move some sites from old site collection to new one.
Export-spweb https://sites/regu -path c:/folderss.cmp -includeuserseurity - includeversions all
Will this command export all the contents in the site which includes libraries, documents, users permissions, versions, workflows ?? If not can suggest how to do.
Upvotes: 1
Views: 4980
Reputation: 550
Here some information about moving a Sharepoint 2013 subsite from one site collection to another.
First of all be sure that if the two site collections are not on the same environments, your servers are on the same patch level. Both SharePoint environments needs to be running on the same versions. If not, the move will not work correctly. This include if environment 1 run on 2013 RTM and environment 2 runs on 2013 SP1. Same for any CU (cumulative updates).
Then, to export a subsite, you will use a Powershell like the one in your question :
Export-spweb -identity "http://webapp/sitecollection/subsite" -path "Exportlocation/ExportFileName.cmp" -includeUserSecurity -IncludeVersions All
includeusersecurity
is an important parameter because this one make sure that all sites permission are included in the export. Also, it make sure that all permissions as well as the data about your list items and files like modified by, created by etc are included.
includeVersions
parameter with a value of All
is also important because it will keep all versions in the export.
After the export is done, before being able to import the subsite, you will need to create a new empty subsite using the same template of the subsite you want to import.
When this new subsite is created in the destination site collection, you can import the site using the Import-SPWeb
Powershell command like this :
Import-SPWeb -Identity "http://target_webapp/target_sitecollection/your_new_subsite" -Path "Exportlocation\ExportFileName.cmp" -includeUserSecurity
Hope this help!
Upvotes: 1