NC23: After server crash, NC reverted to old versions of files and lost newer versions

My linux server running Nextcloud 23.0.12 crashed some time last week, and when I re-booted, it repaired the file system, and Nextcloud became available again. However, all the edits to files after March 2024 are lost, I don’t see them in the files or in the history, as if no edits had occurred since. Is there a way to recover the most recent version of a file in this case? I am out of clue how this could have happened. Unfortunately, all my clients updated with the old files now.

go check in each user folder /versions

Thanks a lot, but unfortunately, no versions between March and yesterday.

hi @schymans welcome to the community :handshake:

I’m sorry you experience such an issue. It’s hard to tell from the little data you provided but I could imagine your database was unable to process the transaction log and recovered at the state from March. this makes all files “invisible” in web interface (and for the client) as Nextcloud primarily relies of the contents of the database to list and display files

I would recommend to

  • backup the database and data from the current state… and
  • try to read current files from the disk using occ files:scan command occ
    • consult docs for reference

general recommendations:

  • nc23 is out of support since years already, please update to a supported version (>nc27)
  • setup and test good and automated backup/restore process

Dear Willi,
Thanks for your help! I will have to update the server and NC as soon as
possible, but cannot do it right now, as I am in the middle of
organising an event where participants were registering in an ods-file
on NC. I will now do it by email and edit the file myself to avoid
further data loss. Still don’t understand what happened there. It is not
just about what files are visible in NC, but even the /versions folder
on the server did not have any newer versions, until I started editing
the file again. Where does occ files:scan look for the files?