Restore the SharePoint Farm
Scenario/Problem: You want to restore the farm from a backup.
Solution: Use the Restore-SPFarm
cmdlet with the Directory
parameter.
The Restore-SPFarm
cmdlet enables you to restore the farm based on the backup files in the directory specified, as shown in Listing 7.14.
Restore-SPFarm -Directory F:\Backups -RestoreMethod Overwrite
The RestoreMethod
parameter can be New
or Overwrite
. Using New
creates a new location for the backup to be restored. Overwrite
restores the backup in place and overwrites the current farm content.
Tip
Use the -Item
parameter with the Restore-SPFarm
cmdlet to restore a specific item in the farm.
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.