NextCloud desktop client erased 200GB and it's not even in the trash folder

Nextcloud version: 24.0.6
PHP version:7.4.3

One of my users managed to erase a folder with 200GBs of data in a second and it’s not even in the trash folder

Today one of my user wanted to sync down a folder, so she thicked the folder in the nextcloud client on windows. The result was, that the folder disappeared from the Nextcloud server. The user space usage went down exactly the folder’s size and as I mentioned it’s not even in the trashbin. There aren’t any error logs from that time period.

The full timeline is this:

A couple of months ago she needed to free up some space on her computer, so unthicked the folder in the client, but because of the nature of the Nextcloud Windows client, it has tried to sync down first the remaining files from the server and only after that delete the locatl folder. So what we ended up doing is after unthicking the flder, we manually deleted it FROM THE MACHINE. Everything happened as expected, we freed up the space on the machine and THE FOLDER REMAINED ON THE NEXTCLOUD SERVER. This was months ago. Today she needed a couple of subfolders from that folder, so she thicked back those subfolders AND THAT’S WHEN, WE LOST THE ENTIRE FOLDER FROM THE SERVER.

My theory:

The only thing I can imagine is that somehow, the windows client figured it out, that we deleted that folder from the machine months ago by hand and ended up deleting the folder from the server, once the sync was “re-thicked”.
Okay, you can say it was user error, but then why the hell is it MISSING FROM THE TRASH ON THE SERVER?

Is there any way to recover the lost data from the server?
Thanks!

Ticking and un-ticking a folder in the client should just change the files being synced to the client and not influence the files on the server. What is dangerous, if you have a folder locally, there are still unsynced files and then you un-tick the folder, so it is deleted locally and the unsynced file (that wasn’t uploaded yet).

Do you have all the logs on the server and you can see if the client really triggered the deletion on the server, this would be a serious bug to be reported to the bug tracker.

Yes I can see it from the Activity of the user, that it just got deleted. What I don’t understand is why it hasn’t ended up in the trash?

The trash is always under the condition that the owner has enough quota that it fits in the trash.

If the user takes again a folder (with some test data) and it is synced and un-synced, can you reproduce the problem?

So I tried.
I created a folder with somw random files and subfolders.
It synced down to the PC.
I paused the sync.
Unthicked the folder in the client.
Deleted the folder by hand from the PC
Resumed the sync.
The Result: It got deleted from the PC and it was still there on Nextcloud.
Then:
I resumed the sync.
The Result: It started syncing down the folder for a second and then it realized somehow, that I deleted that folder and ended up deleting it from Nextcloud as well. Exactly what happend to us.
The only huge difference is this time, the folder ended up in Nextcloud trash and I can restore it quickly.
So my question is still is that: Why on earth my original folder did not ended up in the trash on Nextcloud?!

I seeked help from the facebook group as well and it seems everything is accounted for.
It got deleted, because the client figured it out has been deleted prior. It did not move to the trash because it was waaay more then the 50% of the allocated space to the user. So everything explained then. Thank you for the help we should be more carefull moving forward with the client.

You don’t say if you have a backup, but if not, the right lesson is that you need to implement a backup system. Nextcloud itself (including it’s trash folder) is not a backup, and you need something separate to backup your Nextcloud data. I use rdiff-backup but there are many solutions.

1 Like