All files from the server have disappeared

Hi,
I have nextcloud on my own server, yesterday at 1 p.m. I received information from employees that nextcloud does not work and shows an error,

Your data directory is invalid.
Ensure there is a file called “.ocdata” in the root of the data directory.

Absolutely nothing had been done for a long time and suddenly this error appeared, I don’t know how this file disappeared since no one was doing anything. But ok, I created the file and the application started. Unfortunately, this morning I go to Next Cloud and look, and on the server there are only 200MB of 100GB of files left and these files are nowhere to be found, they are shown in the GUI, but they are not physically there anywhere on the server.

I searched the Internet and found information that many people had the same problem and were unable to recover the files. How is it possible that without deleting the files from my site they disappeared?

Additionally, at the same time, the NextCloud OnlyOffice add-on crashed and showed an error

[2023-10-04T06:31:51.226] [ERROR] [localhost] [conv_1135691488_jpeg] [userId] nodeJS - checkIpFilter error:url=https://mydomain.com/apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6NTgyOTA5LCJ1c2VySWQiOiJtLmtyemFjemtvd3NraUB5ZXRpZm9yY2UuY29tIn0.xo3nisOMBlPGJn8Jn5aE6nKbC6hu_2qqqAXyawEtmRk;code:403;

2023/10/04 06:31:30 [error] 7206#7206: *2168 upstream timed out (110: Unknown error) while reading response header from upstream, client: 172.17.0.1, server: , request: “POST /ConvertService.ashx HTTP/1.1”, upstream: “http://127.0.0.1:8000/ConvertService.ashx”, host: “mydomain.com:8443

[2023-10-04T06:09:23.002] [ERROR] [localhost] [conv_3705837995_jpeg] [userId] nodeJS - checkIpFilter error:url=https://mydomain.com/apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6NTgyOTIxLCJ1c2VySWQiOiJtLmtyemFjemtvd3NraUB5ZXRpZm9yY2UuY29tIn0.IHRCeQ67jq6yFRORTbrsz_B4GA5TjasAWc08RmYc2XM;code:403;

Any ideas? None of the configurations have been changed in a very long time, so that’s not the problem.

First, did you look in the underlying server filesystem (not from within Nextcloud) at the location configured as your datadirectory to see if your files are there? They’ll be in subfolders for each user.

Second, did your check your Nextcloud server logs? They’ll have details about what’s been going on.

Problem found, someone deleted all the files from the server, but the entries remained in the database :frowning: Fortunately, people locally have copies of their files.

  1. Can I somehow force sync on Windows from local to the server, along with the new file upload?
  2. Can I somehow compare the metadata of files from the database and the files in the data directory? And if there is no file for the selected metadata, delete the entry from the database?
  3. How can I delete entries about all files from the database without deleting shared directories?