SPBackupRestoreHistoryList Class

A list of past backup and restore operations (including those that failed or were cancelled before finishing) for a particular backup location.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.Backup.SPBackupRestoreHistoryList

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class SPBackupRestoreHistoryList
'Usage
Dim instance As SPBackupRestoreHistoryList
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPBackupRestoreHistoryList

Remarks

The items in the list are SPBackupRestoreHistoryObject objects.

There is no public constructor for this class. Get a reference to an object of this class with the GetHistory method.

Objects of this class are persisted as the file spbrtoc.xml that is located at CurrentBackupXml. By default this is the root of the backup location.

Examples

The following is an example of a spbrtoc.xml file that records two backup operations, one for the content database for the Central Administration application and the other for the content database for a regular SharePoint Foundation Web application.

<?xml version="1.0" encoding="utf-8"?>
<SPBackupRestoreHistory>
    <SPHistoryObject>
        <SPId>33bda4d7-2b18-408e-8b54-e3a050e085e9</SPId>
        <SPRequestedBy>FABRIKAM\sally</SPRequestedBy>
        <SPBackupMethod>Full</SPBackupMethod>
        <SPRestoreMethod>None</SPRestoreMethod>
        <SPStartTime>10/08/2007 20:35:47</SPStartTime>
        <SPFinishTime>10/08/2007 20:35:55</SPFinishTime>
        <SPIsBackup>True</SPIsBackup>
        <SPBackupDirectory>\\server01\WSSBackups\spbr0002\</SPBackupDirectory>
        <SPDirectoryName>spbr0002</SPDirectoryName>
        <SPDirectoryNumber>2</SPDirectoryNumber>
        <SPTopComponent>Farm\WSS_Administration\Web Application\SharePoint_AdminContent_d86ba3d1-cce5-4391-8135-fae450dd8332</SPTopComponent>
        <SPTopComponentId>a80e3734-75b3-4c7c-b04f-d6003ac3045f</SPTopComponentId>
        <SPWarningCount>0</SPWarningCount>
        <SPErrorCount>0</SPErrorCount>
    </SPHistoryObject>
    <SPHistoryObject>
        <SPId>b3aded39-25c8-48ba-b68e-ac4624536dba</SPId>
        <SPRestoreId>1c8fd1e6-cc2d-4500-9316-3b967934ddbd</SPRestoreId>
        <SPRequestedBy>FABRIKAM\bob</SPRequestedBy>
        <SPBackupMethod>Full</SPBackupMethod>
        <SPRestoreMethod>Overwrite</SPRestoreMethod>
        <SPStartTime>10/08/2007 20:20:13</SPStartTime>
        <SPFinishTime>10/08/2007 20:20:29</SPFinishTime>
        <SPIsBackup>False</SPIsBackup>
        <SPBackupDirectory>\\server01\WSSBackups\spbr0000\</SPBackupDirectory>
        <SPDirectoryName />
        <SPTopComponent>Farm\Windows SharePoint Services Web Application\SharePoint - 42712\WSS_Content_3cfae446821e442a8300185e58423876</SPTopComponent>
        <SPTopComponentId>88c72a5d-08c9-4ee9-9f6a-3cfc3ab7d359</SPTopComponentId>
        <SPWarningCount>0</SPWarningCount>
        <SPErrorCount>0</SPErrorCount>
    </SPHistoryObject>
</SPBackupRestoreHistory>

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPBackupRestoreHistoryList Members

Microsoft.SharePoint.Administration.Backup Namespace