Vault Maintenance
Maintenance recommendations
Summary of the recommended maintenance operations:
- It is not necessary to use the Optimize Database operation regularly. M-Files does it automatically.
- 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 vault and master database backups at least two to four times a year. If the embedded Firebird SQL database is used, see Backing Up a Document Vault, Restoring a Document Vault, and Backing Up the Master Database. If Microsoft SQL Server is used, refer to the documentation of the backup tools you use to create the backups. Also, see M-Files Backup Policy for further guidelines and best practices related to backups.
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. 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.
- Taking the vault offline (vaults that use Firebird or Microsoft SQL Server and dtSearch)
- Rebuilding metadata indexes
- Recalculating relevance scores for objects
- Cleaning out unused access control lists
- Clearing the change logs of object types
- Upgrading the vault database to improve performance
- Backing up metadata (only for vaults that use Firebird as the database engine)
- Restoring metadata (only for vaults that use Firebird as the database engine)
- Rebuilding database indexes
- Updating the statistics for database objects
- Compressing the full-text search index
- Finalizing the operation
- Bringing the vault online (only for vaults that use Firebird as the database engine)
- Rebuilding metadata indexes
- Recalculating relevance scores for objects
- Clearing the change logs of object types
- Updating the statistics for database objects
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
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.
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.