Thursday, 16 June 2016

Backup and Restore Site/Sub site list/document library in SharePoint

Backup and Restore Site/Sub site list/document library in SharePoint
Backup a sub site using power shell: Use export-spweb command to take sub site backup
Export-SPWeb -Identity "<subsite URL>" -Path "<directory\test.cmp>" -IncludeUserSecurity -IncludeVersions all
Restore a sub site using power shell: Use import-spweb command to restore sub site from backup
Import-SPWeb <subsite> URL -Path "<directory\test.cmp>" -Force -IncludeUserSecurity
------------------------------------------------------------------------------------------------------------------------------
Backup a List/Doc Library: use below export command to take list/doc library backup
Export-SPWeb -Identity <Site Collection URL> -Path <path and file name> -ItemURL "/Lists/list or Document library name" [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression]
Restore a List/Doc Library: use below export command to restore list/doc library from backup

Import-SPWeb -Identity <Site Collection URL> -Path <path and file name> [-Force] [-NoFileCompression]

No comments:

Post a Comment