Back Up a Site Collection

Scenario/Problem: You want to back up a specific site collection.

Solution: Use the Backup-SPSite cmdlet.

The Backup-SPSite cmdlet enables you to perform a backup of a specific site collection, creating a backup file based on the path specified. Listing 7.15 shows an example.

Listing 7.15. Sample Script for Backing Up a Site Collection

Backup-SPSite -Identity "http://sp2013/sites/BICenter"-Path F:\Backups\BICenter.bak

The Identity parameter can be the URL or the GUID of the site collection. Using the URL is usually easier. The Path parameter defines where the backup will be stored, along with the name of the backup file to create.

Tip

Run Get-SPSite without any parameters to list the available site collections. ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.