This documentation is archived and is not being maintained.

Specifying the Restore Options

When restoring data to a location that is different from the location at which the backup was created, the backup application must call the SetRestoreOptions() method, passing an XML document in the wszRestoreOptions parameter.

The following example shows the basic structure of this XML document when you are requesting one database to be restored to a different database. In the following example, the element values that start with guid- must be replaced with the proper GUID from either the backup set or from Active Directory. Guids that are appended with –original are the GUIDs coming from the backup set, and the GUIDs appended with –target are the GUIDs of the associated object designating the restore target.


<DATABASE_RESTORE_OPTIONS>
    <DATABASE_GUID_ORIGINAL>
        guid-db1-original
    </DATABASE_GUID_ORIGINAL>
    <DATABASE_GUID_TARGET>
        guid-db1-target
    </DATABASE_GUID_TARGET>
</DATABASE_RESTORE_OPTIONS>

To restore multiple databases, repeat the original and target DATABASE elements, as shown in the following example.


<DATABASE_RESTORE_OPTIONS>
    <DATABASE_GUID_ORIGINAL>
        guid-db1-original
    </DATABASE_GUID_ORIGINAL>
    <DATABASE_GUID_TARGET>
        guid-db1-target
    </DATABASE_GUID_TARGET>
    <DATABASE_GUID_ORIGINAL>
        guid-db2-original
    </DATABASE_GUID_ORIGINAL>
    <DATABASE_GUID_TARGET>
        guid-db2-target
    </DATABASE_GUID_TARGET>
</DATABASE_RESTORE_OPTIONS>

To restore a database to a non-Exchange location, set the target GUIDs to 00000000-0000-0000-0000-000000000000, as in the following example.


<DATABASE_RESTORE_OPTIONS>
    <DATABASE_GUID_ORIGINAL>
        guid-db1-source
    </DATABASE_GUID_ORIGINAL>
    <DATABASE_GUID_TARGET>
        00000000-0000-0000-0000-000000000000
    </DATABASE_GUID_TARGET>
</DATABASE_RESTORE_OPTIONS>
Show: