Frequently Asked Questions
Frequently Asked Questions
MISSING FILES AFTER RESTORING A SQL BACKUP
Posted by Zachary Wick (M-Files) on 01 July 2019 11:10 PM

Version 1.0 | Last Updated 5 March 2019

1     Overview / Work Notes

This issue only effects the following setup:

  • SQL Server database used as the M-Files backend
  • Files stored outside the database in the File Data Location

The symptoms of this issue can be seen in a number of ways. The most common one is when a user tries to open up a document such as a Word document and gets the following error.

"Word experienced an error trying to open the file."

 

Additionally M-Files will also show the following message in system notifications if those are set to display.

"Downloading of the file "Test File (ID 3, file 3-3)" failed. The system cannot find the file specified."

  

When a Verify and Repair (Thorough) is run from the M-Files Admin, the following errors will be displayed.

Error 1:

A file does not exist on disk.

File ID 2, data file version 1. Object type 0, object ID 2, object versions 1.

Upload Only document instructions.docx

m-files://show/2A41383C-0A22-4ADF-A9EB-088C13DD07DB/0-2-2?object=86646A3A-D018-4F5D-A012-756D970A7808

NOTE: M-Files cannot fix this error automatically.

 

Error 2:

A file does not exist on disk.

File ID 2, data file version 2. Object type 0, object ID 2, object versions 2.

Upload Only document instructions.docx

m-files://show/2A41383C-0A22-4ADF-A9EB-088C13DD07DB/0-2-2?object=86646A3A-D018-4F5D-A012-756D970A7808

NOTE: M-Files cannot fix this error automatically.

 

The most common way that this issue happens is if customers back up their file data before their SQL DB. As laid out in our User Guide, you should always back up your SQL Server DB before you back up the file data location. Otherwise, objects could get added to M-Files that there is no file associated with.

https://m-files.com/user-guide/latest/eng/use_ms_sql.html?hl=using%2Csql#using_microsoft_sql_server_as_the_database_engine__backing_up

Other causes for this issue could be the following:

  • Anti-virus could automatically remove or quarantine files which would make them inaccessible to the system
  • Any software that could delete or move files including scripts or backup jobs by other software
  • Permissions get changed on the File Data Location and the files can no longer be accessed by the M-Files Server or by the account specified for File Data Location

2     Solution / Workaround

There is no way for the M-Files software to automatically fix these errors and the best course of action would be to take another backup in the correct order. The only other solutions is if metadata needs to be preserved would to reach out to a dev for the creation of dummy files so that the system has some file to match the metadata up against or to manually destroy the objects that do not have associated files from the Desktop Client. You can use the "Status changed" property in Advanced Search to look for and filter out the documents that happened between the two backups.

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako case