Question in regards to deleting local files on Client

Hello,

I have very special question with an unusual situation I discovered yesterday.

Nextcloud Server: 31.0.14
Nextcloud Client (Mac): 4.0.6

Let me explain what I did:

  1. NC Server and Client are in sync when I started the following procedure
  2. I created a new folder on my Nextcloud Client and it synced to the server
  3. I created a file in this new folder and started to work on it
  4. While I was doing that, I started the update process of Linux server, on which NC server is running. I made a typo and I unintentionally removed several php packages. After “apache reload” NC was not working anymore, which is ok because I made a mistake…
  5. I decided to restore a backup of my NC linux vm from yesterday. And this is, where shit hit the fan ………

When the linux vm with NC started after the restore was complete, my client started syncing at once. It removed the file I was working on from my client, but left the empty folder. But on the server, it did not create the folder. The Nextcloud client on my Mac confirmed, that both server and client have been synced completely but at least for this one folder that was not true.

My questions:

  1. I know that server restore “confused” Nextcloud. But Is this an expected behaviour when server and client are unsure, what the current state of things is? What is Nextclouds method of problem solving?
  2. Why was the file from my client removed but not the folder?
  3. Why was this folder not synced to the freshly restored server?
  4. Where did that file on my Mac go??? I was unable to find it in trash GUI or the trash folder on terminal. Even file restore tools could not find even a fragment of the file

Thank you for your help!

Regards

David