Vault Maintenance
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.
It can also be helpful to see the Why is my M-Files not as fast as it used to be? FAQ article. It contains many frequently encountered issues that can cause system slowness.
Maintenance recommendations
Summary of the recommended maintenance operations:
- Use the Rebuild Full-text Search Index operation twice a year for large repositories (with hundreds of thousands of objects and hundreds of gigabytes of data).
- Use the Reset Thumbnail Images operation only if the thumbnail images do not work correctly.
- Use the Verify and Repair (Quick) operation twice a year for all repositories.
- Clean the vaults at least once a year.
- Verify the integrity of your master database
backups at least two to four times a year.
- Refer to M-Files Backup Policy for further guidelines and best practices related to backups.
- Verify the integrity of your vault backups at least two
to four times a year.
- If Microsoft SQL Server is used, refer to the documentation of the backup tools you use to create the backups for instructions.
- If Firebird SQL database is used, see Backing Up a Vault and Restoring a Vault for instructions.
- When you restore test vaults, make sure that you do not accidentally overwrite the production vault. In addition, when you restore a vault with a new GUID, make sure that you do not let the restored vault, when asked, use any external connections. This can cause problems if the production vault uses the same connections. Finally, please make note that the restored vault can cause, for example, scripts to be executed and assignment emails to be sent.
- Refer to M-Files Backup Policy for further guidelines and best practices related to backups.
See Important Tasks after Installation, Vault Creation, or Vault Migration for a checklist of tasks that we recommend to be done with operations listed in the section.
Optimizing the database
The Optimize Database (Thorough) operation tries to improve the performance of the vault database. The operation defragments indexes, updates database statistics, and compresses the full-text search index.
M-Files automatically does the Optimize Database (Thorough) operation once every week. Normally, it is not necessary to do this yourself. However, if the vault operates more slowly than usual, it can be necessary to do 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 quickly increases from 0 to 10,000 objects.
You can do the operation in the quick mode first, but we recommend to use the thorough mode in most cases. For instructions, see Manual Optimization.
- Rebuilding metadata indexes
- Recalculating relevance scores for objects
- Clearing the change logs of object types
- Updating the statistics for database objects
See Task Order in Thorough Optimization for the list of tasks done during the thorough operation.
Updating encryption status of existing files
- 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.
After you have run the Update encryption status of existing files, you must manually run the Optimize Database (Thorough) operation to remove the old file data of the vault. If the option Delete the files of destroyed objects is available, select it.
Rebuilding the full-text search index
We recommend this operation to be done 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, it can be helpful to do this operation twice every year.
Please take note of this important information before you start the operation:
- This operation completely rebuilds the full-text search index and it
can require a very large amount of time. For example, with vaults that contain a million,
millions, or tens of millions of documents, indexing can take days or
even weeks. Many factors, such as the used indexer, hardware resources, and type of data in
the vault can have a considerable effect on the indexing speed.
- The best practice is to rebuild a duplicate index in the background. Please write to our customer support at [email protected] for further assistance.
- During the rebuild process, search operations can be used but the search results can be limited because the search index is not complete. For instructions on how to have the search operate normally 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].
- Verifying vault information
- Verifying special records
- Verifying data file records
- Verifying physical data files
- Verifying file records
- Verifying file link records
- Verifying object versions
- Verifying object properties (general integrity checks)
- Verifying object properties (detailed integrity checks)
- Verifying object properties (object versions)
- Verifying indexed words for object types
- 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.
- 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
- 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.
- 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.