Monday, 4 May 2015
SharePoint Subsite/ List Export and Import
STSADM Cmds and PowerShell Cmdlets for Export/Import function:
Export Syntax:
stsadm.exe -o export
-url <URL to be exported>
-filename <export file name>
[-overwrite]
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-versions <1-4>
1 - Last major version for files and list items (default)
2 - The current version, either the last major or the last minor
3 - Last major and last minor version for files and list items
4 - All versions for files and list items]
[-cabsize <integer from 1-1024 megabytes> (default: 24)]
[-nofilecompression]
[-quiet]
[-usesqlsnapshot]
Example:
stsadm.exe -o export -url "http://p01.na.******.net/08/globalhr/emea-hr-gbs/hr-france/BDES" -filename "E:\N-C00462312\BDES_Sat.cmp" -includeusersecurity -versions 4 -nofilecompression
Import Syntax:
stsadm.exe -o import
-url <URL to import to>
-filename <import file name>
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-activatesolutions]
[-nologfile]
[-updateversions <1-3>
1 - Add new versions to the current file (default)
2 - Overwrite the file and all its versions (delete then insert)
3 - Ignore the file if it exists on the destination]
[-includeusercustomaction <1-2>
1 - Ignore user custom actions
2 - Include user custom actions (default)]
[-nofilecompression]
[-quiet]
Example:
stsadm.exe -o import -url "http://p05.na.*******.net/08/SPBLR/RH/BDES" -filename "E:\N-C00462312\BDES_Sat.cmp" -includeusersecurity -updateversions 3 -nofilecompression
------------------------------------------------------------------------------------------------------------------------
Syntax:
Export-SPWeb -Identity <SiteURL> -Path <Path and File Name> [-ItemUrl <URL of Site, List, or Library>] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose]
Export-spweb -Identity "http://p01.na.*******.net/08/globalhr/emea-hr-gbs/hr-france/BDES" -path "E:\N-C00462312\BDES.cmp" -IncludeUserSecurity -NoFileCompression -Force
Import-spweb -Identity "http://p05.na.*******.net/08/SPBLR/RH/BDES" -path "E:\N-C00462312\BDES.cmp" -IncludeUserSecurity -NoFileCompression -verbose
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment