Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

SharePoint 2010 Command Line Backup and Restore: Reviewing Your Backup and Restore History

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
5/22/2011 4:53:29 PM
The purpose of the Get-SPBackupHistory cmdlet is pretty self-explanatory. It outputs a listing of the Backup-SPFarm and Restore-SPFarm operations that have been conducted using the files in the specified directory. The Get-SPBackupHistory cmdlet uses the spbrtoc.xml file stored within the target backup storage directory to determine and display information.

Caution

The Get-SPBackupHistory cmdlet can only be used to display information on backups created via the Backup-SPFarm cmdlet, restores conducted via the Restore-SPFarm cmdlet, or catastrophic operations run using the Central Administration site’s backup or restore tools. It does not work for other types of backups, such as site collection backups via Backup-SPSite.


A sample Get-SPBackupHistory request is listed next:

Get-SPBackupHistory -Directory \\backups

You can use the following switches and input parameters with the Get-SPBackupHistory operation:

  • Directory. This input parameter is required when running Get-SPBackupHistory. The same rules apply to this parameter as the Directory input parameters for the restore and backup cmdlets discussed earlier.

  • AssignmentCollection. This is an optional parameter, intended to allow for the proper disposal of objects. Consider using this parameter if your call of Get-SPBackupHistory also involves using SharePoint’s SPWeb, SPSite, or SPSiteAdministration objects; otherwise, it is not likely to be necessary.

  • ShowBackup. This input switch is not required when running Get-SPBackupHistory. When used, it filters the output of the operation so that the cmdlet returns only backup operation history data.

  • ShowRestore. This input switch is not required when running Get-SPBackupHistory. When used, it filters the output of the operation so that the cmdlet displays only restore operation history data.

Note

If you omit the Backup and Restore switches from the Get-SPBackupHistory request, the cmdlet returns the history data for all backup and restore operations. If you use the Backup and Restore switches with the Get-SPBackupHistory request, the cmdlet returns the history data for all backup and restore operations.


Now that you have successfully run the Get-SPBackupHistory cmdlet, let’s talk about its output and what you can do with it. A review of its output demonstrates why PowerShell makes command line administration in SharePoint 2010 so much better. Because Get-SPBackupHistory returns an array of all backup and restore operations run in the target directory, it provides much more useful and manageable data than what was available with similar commands in previous versions of SharePoint. This means you don’t have to transform the cmdlet’s output into a useable format first if you want to extract pertinent data from it with a scripted process; it’s already in such a format. And thanks to PowerShell’s pipelining capabilities, you can do things like pass its output right into a query to select the most recent successful backup, and then pass the BackupID for that instance directly to Restore-SPFarm. The result: in one line of PowerShell script, you can use Get-SPBackupHistory to automatically restore your most recent backup.

Other -----------------
- Windows Server 2008 : Choosing Server Roles
- Windows Server 2008 : Overview of Site and Replication Topology
- Windows Server 2008 : Overview of Physical Requirements and Physical Topology
- Windows Server 2008 : Overview of Forest and Domain Trust Models
- Exchange Server 2010 : Managing Records (part 2) - Administrating Managed Folders
- Exchange Server 2010 : Managing Records (part 1) - Using MRM & Configuring Retention Tags and Retention Policies
- Windows Server 2008 : Designing an Active Directory Domain Structure
- Windows Server 2008 : Designing a Forest Structure
- Using SharePoint 2010’s Catastrophic Restore Cmdlets
- Using SharePoint 2010’s Catastrophic Backup Cmdlets
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server