How to backup a subsite in SharePoint 2019?
In SharePoint 2019, to backup a subsite in PowerShell, you have to use Export-SPWeb as the following:
Export-SPWeb https://site -Path "C:\Temp\export.cmp" -IncludeVersions -IncludeAlerts -IncludeUserSecurity
The above cmdlet, will backup the SharePoint subsite includes
- Versions
- Alerts
- User Security
- Child subsites
Note:
The Export-SPWeb
doesn't include the below items:
- Recycle bin items
- Workflow association-data
- Audit logs
How to restore a subsite in SharePoint 2019?
In SharePoint 2019, to restore a subsite in PowerShell, you have to use Import-SPWeb as the following:
Import-SPWeb https://site -Path export.cmp -includeusersecurity -UpdateVersions Overwrite
See also Backup and Restore Site Collection SharePoint 2016