[id hidden] {if $message > ""} {end}
[$message]
Libraries: [library list keys="[$libkeys]" vals="[$libnames]" sep=$01$ rows=5]
Mode: [mode radio keys="0;1;2;3;4" vals="Analyze;Analyze and Repair;Rebuild Keys (locks library);Rebuild category indexes;Reconstruct Library (locks library)"]
UnForm document libraries are robust and high-capacity file structures that normally will not experience data corruption. However, in the event of system problems, such as memory or disk errors, or power failures, it is possible for the libraries to become corrupt, which can result in limited or failed access to a library's documents.

The library structure is one that lends itself to recovery in different ways. There are three primary data files that store information about documents, categories, and document images. Each document can contain multiple document images, which are physically stored in a unique file below the library directory itself. Those unique files store not only images but also redundant versions of the document and document image information records, known as shadow records. Both the main and shadow records are stored with a CRC value to enable validation of the record's integrity.

In addition, the category index values are stored in both the main document information file and the category index file, so the category indexes can be rebuilt if necessary.

This library maintenance program is used to analyze and optionally repair or reconstruct a library that has been damaged. UnForm document libraries are made up of numerous files, with data redundancy that provides for recovery of all non-damaged documents in the event of serious file corruption.

There are five options in this utility:

  • Analyze, used to scan the library and its shadow records for corruption or inconsistancies.

  • Analyze and Repair, used to scan and attempt to correct simple inconsistencies, such as mis-matched shadow records, or CRC errors in library records that can be corrected from shadow records.

  • Rebuild Keys, used to re-generate just the index keys to the main library files (not the unique image files). In many cases, file corruption affects only a limited portion of a file. If that portion contains only index key segments of the file, then this option provides a fast repair process, where the index keys are rebuilt from the data at a file-system level.

    Note that the library is locked during this process.

  • Rebuild Category Indexes, used to rebuild the category indexes from the categories found in each document's properties. This procedure does not have to lock the library.

  • Reconstruct Library, used to completely rebuild the library from the shadow records stored with the image files. All undamaged image files are used, resulting in a rebuilt library that should be free of corruption, though if there are unreadable image data files, not all documents can be recovered. Note that this option can also be used to recover disk space after a library has been purged of many or all its records. A file with many deleted records will re-use the space formerly occupied by those records, but the space is not released back to the file system unless the library is reconstructed.

    Note that the library is locked during this process.

If you suspect data corruption in a library, you should first run an Analyze or Analyze and Repair option. If, after that process, you still suspect corruption, or a second Analyze run following an Analyze and Repair run still reports problems, then you should try a Rebuild Keys or a Reconstruct Library run. Rebuilding Keys is a less aggressive and faster process, as it attempts to repair files in place. Reconstructing the library removes all library data except the image files and rebuilds from those files, which is more time consuming and relies on the integrity of the image files.

Note that regardless of these library utilities, you should always maintain good backups of your libraries, to provide recovery in the case of catastrophic disk or system failure.