Professional Documents
Culture Documents
Maintenance Guidelines For M-Files Administrators
Maintenance Guidelines For M-Files Administrators
MAINTENANCE GUIDELINES
FOR M-FILES ADMINISTRATORS
LAST UPDATED 9 DECEMBER 2022
VERSION 1.8
Abstract
The aim of this document is to help M-Files administrators ensure that their on-premises M-Files system is and keeps
running efficiently. In addition to system requirements and recommendations, the text contains guidelines for periodic
maintenance tasks as well as instructions for upgrading the M-Files software and for maintaining backups.
9. Troubleshooting ................................................................................................................................................................ 14
The aim of this document is to provide best practices for maintaining M-Files Server and M-Files vaults in an on-premises
environment. The document is intended for system administrators responsible for managing the M-Files system in their
organization.
Important: You should never edit the M-Files database with anything other than the tools or APIs provided by M-
Files. Modifying the database manually with 3rd party tools is strongly discouraged.
The maintenance tasks described further below have been listed in the following table:
Check M-Files-related events in the Windows event log on a regular basis for any issues, especially ones pertaining to
backups. Consider using a PowerShell script or a third-party application for sending e-mail notifications when
aforementioned events occur.
5
Note: If the disk space on the server computer allows, we recommend expanding the maximum log size of the
Application log to, for instance, 200,000 KB to cover more events. In some error cases, a large number of events
may be recorded to the log, thus filling the default log size of about 20 MB very quickly. This may make it
impossible to track down the origin of the issue.
You can change the log size by right-clicking the Application node in the left-side tree view and then selecting
Properties from the context menu. Expanding the log size of the client computers is rarely needed, but may be of
use in some cases.
It is important to keep track of how much resources are needed to run the M-Files system. If the resource consumption
reaches certain thresholds, it might be time to consider upgrading your system (see System Requirements in the M-Files
user guide).
Regularly make sure that all your scheduled replication tasks are producing the expected results and that there are no
replication conflicts in any of the vaults. For instructions on how to find and resolve replication conflicts, see Conflicts and
their resolution under Synchronization of Objects and Their Values Between Vaults in the M-Files user guide.
Replication conflicts should be cleared at least once a month, but it might also be a good idea to appoint a designated user
to check the conflicts each week.
6
2.4 Quarterly Tasks
If your organization is using Microsoft SQL Server as the database engine and you are storing the file data in a file system
folder (instead of the vault database), manually run the Optimize Database (Thorough) operation from one to four times a
year. This is the only way to remove any destroyed files from the file data server in this type of setup. The operation should
also be run after an exceptionally large number of files have been destroyed at once, for instance after files have been
archived to another vault.
Note: Make sure that the optimization is not performed between file data and metadata backups.
Note: The operation forces Firebird and Microsoft SQL Server vaults to be taken offline for the duration of the
operation. Before executing the operation for Firebird vaults, make sure that the server has at least thrice the
amount of hard disk space required by the metadata file of the vault. For instructions on how to check the size of
the vault metadata file, see section 3.
Note: Depending on the size of the vault, the operation may take an extensive amount of time to complete.
You can use this operation to make sure that that the database is intact and that all the data has been saved correctly to
M-Files. If errors are found, some of them can be repaired automatically by M-Files, but some errors need user actions. If
you have errors that cannot be resolved automatically, and that you cannot fix yourself, please contact our customer
support at m-files.com/support.
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.
7
Note: The vault can be used when the Verify and Repair operation is locating issues in the vault. In case flaws are
found, however, the operation should be run again while the vault is offline. To do this, enable the following
option under Advanced Vault Settings: Database > Verification > Take the Vault Offline and then run the
operation. If you wish, disable the Take the Vault Offline option when you are done.
Note: Depending on the size of the vault, the operation may take an extensive amount of time to complete.
To see which tasks are done with the operation, see Verify and Repair in the M-Files user guide.
If you notice a considerable decrease in free-text search performance, it may be a good idea to rebuild the search index. For
large repositories, this is usually a time-consuming operation. For detailed instructions on how to rebuild the index, refer to
the document How to rebuild the full-text search index in a large repository.
Note: Running the operation might cause quick search to not function optimally in the vault. Other than that,
users should be able to continue using the vault normally. Note that, depending on the size of the vault, the
operation may take an extensive amount of time to complete.
If your organization is using unlimited event logs, it is a good idea to archive M-Files event logs once or twice per year. For
instance, all installations using the Compliance Kit application also use unlimited event logs.
You can export all the events currently recorded in the event log by completing the following steps:
1. Open M-Files Admin.
2. Expand the server connection of your choice.
3. Expand the vault of your choice.
4. Select the Event Log node.
5. Click Export… in the task area.
6. Click the Export All Events… button.
7. Select the save location for the XML file and click OK.
8. Click Delete.
Once you have completed these steps, the events from the M-Files event log should be archived in the location of your
choice as an XML file.
For vaults that use Microsoft SQL Server as the database engine and do not have the Advanced Event Log features option
enabled (see the Audit trail features section under Document Vault Advanced Properties), increasing the number of events
in the M-Files event log should be considered. The event log should preferably contain the events for the duration of at least
one month. For a busy system, the default 10,000 events does not cover a full day but in some systems the 10,000 events
may be enough for a month. The number of events can be increased for Firebird vaults as well, but as it increases the
database size (limited to a few gigabytes at most) it should be considered whether this increase can be afforded.
8
To change the number of evets recorded to the M-Files event log:
1. Open Advanced Vault Settings.
2. Expand the Event Log node.
3. Set the value with the Maximum Number of Events setting.
Refer to Cleaning the vaults in the M-Files user guide. After this, shrink the SQL database.
M-Files uses Firebird as the default vault database engine. It is recommended, however, to use Microsoft SQL Server as the
database engine for vaults that contain several hundreds of thousands of objects. If a vault has originally been set up to use
Firebird but the number of objects in the vault and the size of the metadata file has since then significantly increased, it
might be beneficial to have the vault use Microsoft SQL Server as the database engine instead.
In practice, when the size of the metadata file for a single vault reaches 1 GB (see instructions for checking the metadata file
size further below), a registry setting can be applied to extend Firebird usability to up to 2 GB per vault, but it might also be a
good idea to start planning Microsoft SQL Server migration (see Migrate to Microsoft SQL Server in the M-Files user guide).
Firebird can be used when the size of the metadata file for a single vault exceeds 2 GB, but for performance reasons we
recommend migrating to Microsoft SQL Server.
The metadata file of a Firebird vault is by default stored under the following location on the server computer:
C:\Program Files\M-Files\Server Vaults\<vault name>\MetaData
The metadata file location along with the file data folder is shown at the bottom of the Document Vault - Firebird dialog.
9
3.2 Registry Setting for Extending Firebird Usability
The following registry setting can be added to extend Firebird usability in 64-bit installations:
Value 00004000 Sets the page file size at 16,384 bytes, which the Firebird maximum. This increases the
database memory allocation and use to two gigabytes.
After adding the registry setting, run the Optimize Database (Thorough) operation for the vault (see section 2.4.1).
When using Microsoft SQL Server as the vault database engine, please take the following into consideration:
• The memory usage for every Microsoft SQL instance should be limited via Microsoft SQL Management Studio.
• Storing the file data in a separate file system (instead of the SQL database) usually improves performance in large-
scale systems.
o Remember to back up your file data when storing it in a separately specified location.
• The order in which backups are created is especially important when backing up vaults using Microsoft SQL Server as
the database engine. For more information, see M-Files Backup Policy.
The Express edition of Microsoft SQL Server has hard limits for memory usage and the database size. If the size limits are
exceeded, it might no longer be possible to use the database.
4. Managing Users
Sometimes it may be necessary to change the login account for a user. The user's login account may have to be changed
when, for example, the user needs a new login account due to his or her last name being changed or when login accounts
are moved from one domain to another. For instructions on how to do this, see Changing the User Login Account in the M-
Files user guide.
Before making changes to any production vaults, it is a good idea to create a staging vault for testing out your modifications.
You can easily create a staging vault by using the Copy Document Vault function in M-Files Admin. See Copying a Document
Vault in the M-Files user guide for instructions.
10
Sizeable structural changes in a vault may cause increased resource consumption and should be tested before introducing
them to the corresponding production vault. Structural modifications may also cause indirect issues, such as report objects
to stop working as expected.
The named access control lists of vault should optimally only contain user groups and pseudo-users. Even if you only need to
add one user to a named access control list, it is advisable to first add them to a user group, and then add the user group to
the named access control list – or, alternatively, add them as a pseudo-user. Adding several individual users to a named
access control list may cause slowness for vault users.
6. Maintaining Backups
It is recommended to create different, scheduled layers of backups for your document vaults and the master database. Note
that the backups must be scheduled separately for each vault and for the master database.
It is important to keep long-term backups, for example, in case of slow file corruption sometimes caused by defective
hardware. This type of defect usually goes unnoticed for a long time. If this happens, it is crucial to have a long-term backup
to be used as a basis to start building a new information repository.
Important: Do not back up an active M-Files system with a snapshot of the file system where its data is stored.
This can create a damaged or unusable backup because writes to files, most importantly the database engine
files, can be ongoing and thus incomplete. If you use full virtual machine (VM) snapshots for backups, make sure
that the VM software fully supports creation of snapshots of an active system. This means that the software can
restore the system to exactly the same state, including the memory and CPU states.
See M-Files Backup Policy for instructions on how to create a backup plan for your organization.
11
• The backups should be stored to a different computer in a different physical location.
• The account writing a new backup should not be able to overwrite any stored backups.
• Any custom notification templates need to be backed up manually.
o The server-level notification templates are, by default, stored under the following path:
C:\Program Files\M-Files\<M-Files version>\Server
o The vault-specific notification templates are, by default, stored under the following path:
C:\Program Files\M-Files\<version>\Server\Data\Notifications\<vault GUID>\
• Any M-Files Web modifications need to be backed up separately.
o The files that need to be backed up is listed in the last section (Modifying M-Files Web UI Theme) of the
document How to change M-Files Desktop and Web UI theme.
• Any manually modified registry settings need to be backed up separately.
7. Upgrading M-Files
By default, M-Files is upgraded via automatic updates. If you have opted out from using the automatic updates, it is highly
important to make sure you are always running a version of M-Files currently covered by your support agreement, ideally
the latest available software version.
8.1 Prerequisites
In addition, you should have a recent backup of the following components in case you have modified them:
• Server-level or vault-specific notification templates
• M-Files Web modifications
• Customized registry settings
12
8.2 Recovering the Master Database
Your master database should now have been restored along with, for instance, all the server login accounts and scheduled
backup jobs.
If you need to reconnect to a vault using Microsoft SQL Server as the database engine, do the following:
1. Open M-Files Admin.
2. Right-click the Document Vaults node in the left-side tree view.
3. Select Attach Document Vault… from the context menu.
4. To the Name field, type in the name of the vault.
5. Open the Advanced tab.
6. Select Use Microsoft SQL Server and click Define.
7. Insert the connection information for the vault and click OK.
8. In the Attach Document Vault dialog, click OK to save your changes.
Your vault using Microsoft SQL Server as the database engine should now appear in the vault listing.
As noted in section 6.1, custom notification templates, M-Files Web modifications, and manually modified registry settings
are not included in M-Files backups.
To restore notification templates, replace the ones in the following locations with your backed up, custom templates:
• The server-level notification templates are, by default, stored under the following path:
C:\Program Files\M-Files\<M-Files version>\Server
• The vault-specific notification templates are, by default, stored under the following path:
C:\Program Files\M-Files\<version>\Server\Data\Notifications\<vault GUID>\
13
8.5.2 M-Files Web modifications
Using your backup, replace the files in the locations described in the last section (Modifying M-Files Web UI Theme) of the
document How to change M-Files Desktop and Web UI theme.
Any manually modified registry settings need to be reapplied after uninstalling and reinstalling the software.
9. Troubleshooting
If your M-Files Server is not functioning normally, restarting the server computer may resolve minor issues.
In case you are using a Microsoft SQL Server database, it is being run on different computer than M-Files Server, and you
suspect that there is an issue with the database, restarting the service may help.
14
9.3 Typical Error Situations
This section lists some of the most common error situations and guides how to deal with the issues.
In case you have trouble locating a certain document or you have a link to an M-Files object that does not seem to be
working as expected, please proceed in the following manner:
1. Make sure the issue affects more than one user or one workstation.
2. Ensure that the user attempting to search or open the object via link has the appropriate permission for it.
3. Check in all the objects that you (or the user with the issue) currently have (has) checked out.
4. Open the Clear Local Cache dialog.
5. Make a backup of any crucial objects in the list.
6. Click the Delete All button and then Finish.
7. Check the Windows event log for errors related to M-Files indexing.
If any of the steps do not resolve the issue, and it seems to affect the entire vault, it might help to rebuild the search indexes
(see section 0).
In case M-Files users are experiencing noticeable performance issues in their day-to-day use of M-Files, carry out the
procedures outlined in this section to pinpoint the potential source or sources of the problem. System slowness may be
caused by various factors, such as hardware or infrastructure issues, vault structure or periodic maintenance operations, or
issues related to opening views or files, and so on.
Performance issues may be caused by hardware or infrastructure related problems. Inspect the following performance
counters on the M-Files Server computer as well as the Microsoft SQL Server computer (if they are separate servers):
• The page file usage: Use Performance Monitor to check the current and peak page file usage. Note that Windows
always uses the page file no matter how much RAM you have, but if the page file peak usage is higher than around
10 percent, it may indicate that the system is at least periodically low on RAM or that RAM usage is excessive.
15
1. Open Performance Monitor by selecting Performance Monitor under Administrative Tools.
2. Expand Monitoring Tools in the left column and then select Performance Monitor.
3. Right-click on the graph and select Add Counters... from the context menu.
4. Select Paging File from the Available counters list.
5. Click on the down-arrow icon to the right of Paging File.
6. Select % Usage under Paging File and click the Add button to add the counter on the Added counters list.
7. Click the OK button to close the Add Counters dialog.
Note: These values are approximates and depend on multiple factors, such as the number of vaults,
the use of server side vault applications, and so on.
When contacting our support about performance issues, consider attaching the following components to your request:
• Windows Application event log for M-Files events
• An export of Server Activity Monitor data via M-Files Admin
• Screenshots of the Windows Task Manager pages displaying CPU and RAM usage
• Page file information
• Hardware specifications of the server(s)
System slowness may also be caused by issues in the vault structure, and periodic maintenance operations may be perceived
as performance issues by the end user.
The following factors related to vault structure or maintenance operations may cause (temporary) system slowness:
• The metadata of the vault may not be optimal.
16
o There should not, for instance, be value lists with tens of thousands of entries or classes with hundreds of
obligatory properties.
• Modifying named access control lists causes the permissions of every affected document to be updated and may
thus induce temporary system slowness.
• Running background jobs like optimizations and backups may cause temporary slowness. These operations should
not be run during high usage hours.
• Having a large number of export and import jobs running at short intervals may cause performance issues.
• The event log in M-Files Admin may be used to reveal instances of exceptional vault use, such as excessive number of
file downloads.
• The size of the vault metadata, especially for Firebird vaults, may be too large. See section 3.1 for more information.
Perform the following checks to verify if system slowness occurs in conjunction with opening views or performing searches:
1. Use M-Files Desktop on the M-Files server computer and use Local Procedure Call as the protocol for connecting to
the vault to rule out potential network-related issues.
Note: See Adding a Document Vault Connection in the user guide for further instructions on defining the vault
connection and using Local Procedure Call as the protocol.
2. Log in to the vault as a normal user, not as administrator, so that permission checks are not bypassed when using the
vault and thus you can verify whether or not the issue is related to permission checks.
3. Try changing the properties of a view, and then press Shift+F5 to fully refresh the view after its properties have been
changed. Try modifying different properties of views, such as filters or grouping levels, to see if the problem is
related to views.
Note: You can create a copy of an existing view so that you do not need to change the properties of the
original view. Right-click a view of your choice and select Copy from the context menu, then right-click on an
empty space in the listing area and select Paste from the context menu.
In case you are using Microsoft SQL Server as the database engine and the Windows event log on the server computer
reports Microsoft SQL Server related errors, you can try running the "dbcc checkdb" operation for the M-Files database. If
any errors are found, take the vault offline and contact M-Files immediately. Do not attempt to fix any errors yourself. For
contacting M-Files support, see m-files.com/support.
Before contacting the support, please attempt to gather as much data as possible, including:
17
o Does the issue affect only one client or multiple clients?
▪ If only one client is affected, try reproducing the issue with another user account.
o Does the issue affect only one user or multiple users?
o Does the issue appear if the client is running on the M-Files application server?
▪ This enables ruling out network-related issues.
o Which M-Files server and client versions are used?
▪ For instance "M-Files 2015.2 (11.2.4320.87)".
• When was the issue first detected?
o Did the issue appear gradually (such as slowing down for a few days or weeks) or suddenly?
• In case the issue affects more than one system or user:
o Are you using Firebird or Microsoft SQL Server as the vault database engine?
▪ Is your file data stored on the server or in a separate file system?
o What are the server resources?
▪ CPU, RAM, disk space on the system disk and on the disks storing M-Files file data.
o Are there any M-Files-related errors listed in the Windows event log?
▪ See section 2.1.1 for instructions on how to access the Windows event log.
Providing this information (where applicable) can shorten the resolution time of your issue.
1.1 2017/06/12 In sections 2.4.1, 2.5.1, and 0, pointed out that the duration of the operations is relative to the size of
the vault and that the operations may take an extensive amount of time to complete.
1.5 2020/12/21 Updated the instructions on how to change the number of events recorded to the M-Files event log.
18
• How to rebuild the full-text search index in a large repository
• M-Files Backup Policy
• How to change M-Files Desktop and Web UI theme
19