Restoring the RSM Database in the Absence of a Backup
[This is preliminary documentation and subject to change.]
This section describes a strategy for an application to recover the RSM database when the database has been lost and there is no backup copy, but the application has not lost the database that refers to the lost RSM database. For this example it is assumed that the application has kept both the RSM LMID and its own OMID information in its database. An application can take the following steps to recover the RSM database:
-
All the media in the library will appear in the import pool.
-
The application must have a mechanism that scans the Import media pool for its media. This can be accomplished by reading the OMID information of the partitions of the physical media and finding all media with the szOmidLabelType parameter that is the application's type. As an additional check the application can verify that the szOmidLabelInfo parameter is correct for the media.
-
For all partitions found, the application must call the AllocateNtmsMedia function, specifying the partition and media pool, to allocate the target media pool.
-
The application database must be updated with the new LMID that is assigned to the media. The application should search through its database for all cases of the OMID it has found and replace the corresponding LMID with the new one.
-
After the operation is complete, both the RSM database and the application's database should be in a usable state again.
-
Media that is not in the library must be inserted to fully reconstruct the RSM database.