Vault Maintenance

Note: This content is no longer updated. For the latest content, please go to the user guide for M-Files Online. For information on the supported product versions, refer to our lifecycle policy.

Maintenance recommendations

Summary of the recommended maintenance operations:

Regular vault maintenance makes sure that there is high performance even for vaults with a large number of objects. The Maintenance submenu for a vault in M-Files Admin contains functions to verify and optimize the integrity of the internal database structure. It also contains functions to rebuild the full-text search index and to reset thumbnail images in the vault. Also, it is important to regularly verify the integrity of your vault and master database backups. See also Manual Optimization.

Optimizing the database

The Optimize Database (Thorough) operation tries to make the performance of the vault database better. The operation defragments indexes, updates database statistics, and compresses the full-text search index.

M-Files automatically runs the Optimize Database (Thorough) operation once a week. Normally, it is not necessary to do this yourself at all. However, if the vault responds more slowly than usual, it can be necessary to run the operation. The vault can respond slowly after a large number of objects is imported to the vault (for example if the number of objects in a vault that uses Firebird as the database engine quickly increases from 0 to 10,000 objects).

You can run the operation in the quick mode first, but we recommend to use the thorough mode in most cases.

These tasks are done when you run the Optimize Database (Thorough) operation:
  1. Taking the vault offline (for vaults that use Firebird or Microsoft SQL Server as the database engine)
  2. Rebuilding metadata indexes
  3. Recalculating relevance scores for objects
  4. Cleaning out unused access control lists
  5. Clearing the change logs of object types
  6. Upgrading the vault database to improve performance
  7. Backing up metadata (only for vaults that use Firebird as the database engine)
  8. Restoring metadata (only for vaults that use Firebird as the database engine)
  9. Rebuilding database indexes
  10. Updating the statistics for database objects
  11. Compressing the full-text search index
  12. Finalizing the operation
  13. Bringing the vault online (only for vaults that use Firebird as the database engine)
These tasks are done when you run the Optimize Database (Quick) operation:
  1. Rebuilding metadata indexes
  2. Recalculating relevance scores for objects
  3. Clearing the change logs of object types
  4. Updating the statistics for database objects

Updating encryption status of existing files

The selection of the setting Enable encryption for file data at rest in the Document Vault Advanced Properties has an effect on the functionality of the Update encryption status of existing files operation:
  • If the Enable encryption for file data at rest is selected, all the files in the vault previously not encrypted are now encrypted as well.
  • If the Enable encryption for file data at rest is not selected, the encryption of all the encrypted files in the vault is removed.

Rebuilding the full-text search index

This operation completely rebuilds the full-text search index and can require a large amount of time. For example, in vaults with tens of gigabytes of data, the operation can continue several days.

We recommend to do this operation if you think that the search index is corrupted or if the search operations are slower than usual. In large repositories, especially if the objects are edited a lot, we recommend that you do this operation twice every year.

Warning: Search operations in the vault are disabled immediately when the rebuild process starts. For instructions on how to let vault users use the search operations during the process, refer to Rebuilding the dtSearch Full-Text Search Index. See also Rebuilding Search Indexes.

Resetting thumbnail images

You can reset the thumbnail image cache for the vault if you use the thumbnail view in M-Files Desktop and if the images are not working correctly. This can happen, for instance, after installing a software capable of displaying thumbnails that could not previously be shown.

Using Verify and Repair

You can use this operation to verify that the database is intact and that all the data has been saved correctly to M-Files.

If errors are found, M-Files repairs some of them automatically, but some errors need user actions. If you have errors that cannot be fixed automatically or you cannot fix yourself, write to our customer support at [email protected].

These tasks are done when you run the Verify and Repair operation:
  1. Verifying vault information
  2. Verifying special records
  3. Verifying data file records
  4. Verifying physical data files
  5. Verifying file records
  6. Verifying file link records
  7. Verifying object versions
  8. Verifying object properties (general integrity checks)
  9. Verifying object properties (detailed integrity checks)
  10. Finalizing the operation

For large vaults, the operation time of Verify and Repair (Thorough) can be long. Thus, we recommend that you use the operation in the quick mode twice per year.

The steps during the Verify and Repair (Quick) and Verify and Repair (Thorough) operations are the same except for the verification of physical data files (step 4). In this step, the thorough mode checks whether file checksums of the physical files in the vault file data location match those reported by the metadata database.

Cleaning the vaults

When you clean the vaults, you release disk space for new objects.

To clean a vault:
  1. In M-Files Admin, export the content that you want to remove from the vault.
    Example filter:
    • Status tab: Deleted set to No
    • Properties tab: Created property with the <= operator and the value set to a date
  2. In M-Files Desktop, delete the objects that you have already exported and enable Destroy permanently.
    Note: When you search for objects to delete and destroy, use the same filters as in step 1. This makes sure that you only destroy content that you have exported.
  3. In M-Files Admin, manually optimize the database.

    Enable Delete the files of destroyed objects.

    Note: The scheduled automatic optimization does not remove the destroyed files.