Protect server side files against accidental local deletions

Hello all,

I have been using Nextcloud for over two years now with my server and all works great. Recently, I have been wondering about a possible issue that may appear:

what happens if I accidentally delete a file on my computer and nextcloud syncs? I loose the file on the server as well no?

Is there a way to define some folders or files that should only be synced to the server, but if they are deleted they should not be deleted from the server unles i allow it in the client? Like an extra extra step before a permenent deletion?

Cheers

Backup? And what is if you only modify a file locally?
An unrecognized change can be worse than a recognized deletion.

sync as usual, just don’t delete right away from the server. ask explicitly for that action. something like: I send something to trash bit, Nextcloud Client detects the action and asks: do you want to also delete the file from the server? yes no.

Something like that.