IBackupRestore.CanRenameOnRestore Property

Gets a value that indicates whether the IBackupRestore object can be renamed when it is restored.

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


ReadOnly Property CanRenameOnRestore As Boolean
Dim instance As IBackupRestore
Dim value As Boolean

value = instance.CanRenameOnRestore
bool CanRenameOnRestore { get; }

Property Value

Type: System.Boolean
true if renaming is allowed; otherwise, false.


If a component cannot be renamed, then it cannot be restored to a location other than the source of the original backup. Therefore, it cannot be migrated by means of a backup and restore.


Setting CanRenameOnRestore to true is only a minimal condition for migration. You must also initialize SPServer, SPName, and SPLocation to their current values in your implementation of OnPreRestore. 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.

If users should never be able to restore objects of your custom component class to a new location, the get accessor should return false. If users should be able to migrate any object of your class, the get accessor should return true. In most other cases, implement the property as a wrapper around a private Boolean field.

See Also


IBackupRestore Interface

IBackupRestore Members

Microsoft.SharePoint.Administration.Backup Namespace