Provides restore preparation processing.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
- Type: System.Object
The object that calls .
- Type: Microsoft.SharePoint.Administration.Backup.SPRestoreInformation
An SPRestoreInformation object that contains data about the operation.
Return valueType: System.Boolean
true if successful; otherwise, false.
In most situations, a restoration operation requires no preparation and your implementation of should just return true.
Some examples of things you might need to accomplish with your implementation:
If the content component represented by the IBackupRestore object is some kind of database, can be used to specify settings information needed to connect with the database application.
If your implementation of takes a significant portion of the total time for the backup operation, set args.CurrentProgess() to an appropriate value.
If you want end users to have the option of migrating the backed up content, your implementation of must also initialize SPServer, SPName, and SPLocation to their current values. If you do not do this initialization, the Central Administration application will not present the end user with a UI in which he or she can enter a new server, component name, or location. In SharePoint Foundation, this UI is in the New Names section of the Restore from Backup - Step 4 of 4 page of the Central Administration application. (It is also necessary that CanRenameOnRestore be set to true.)
Do not stop or pause a service or Web application in the OnPreRestore(Object, SPBackupInformation) method. See OnRestore(Object, SPBackupInformation) for why.