Search This Blog

Friday, 12 April 2013

Import and Export a Site Collection

Hi,

This is pretty simple.
Open SharePoint Management Shell in Admin mode.
Make sure the user you are logged on with has got full rights everywhere.

Export Command:
export-spweb -identity http://yoursiteurl -path c:\path\filename.cmp


Export-SPWeb -Identity <SiteURL> -Path <Path and File Name> [-ItemUrl <URL of Site, List, or Library>] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]


Import Command:
Import-spweb -identity http://yoursiteUrl -path c:\yourpath\filename.cmp


Import-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-ActivateSolutions <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-HaltOnError <SwitchParameter>] [-HaltOnWarning <SwitchParameter>] [-IncludeUserCustomAction <None | All>] [-IncludeUserSecurity <SwitchParameter>] [-NoFileCompression <SwitchParameter>] [-NoLogFile <SwitchParameter>] [-UpdateVersions <Append | Overwrite | Ignore>] [-WhatIf [<SwitchParameter>]]


i Have used the command to export and import sites between different domains and it works just fine. There is a security parameter which you can remove if you are doing it between different domains.

To over write existing lists you can add "-updateversions overwrite" this however does not seem to over write everything.



No comments:

Post a Comment