NC Client - Halt sync before a lot of files will be deleted/modified

Hello to the Community,

I’m posting there a question before making it to Github.
Edit : Posted on Github : https://github.com/nextcloud/client/issues/68

My client is facing a difficulty using Nextcloud on one point, Deletion by mystake.

There is a group for 5 users working together most of the time inside a shared folder.
Everybody need to edit those files, create new ones and delete.
The problem happened two times in 4 months, someone by mystake delete a big folder (93Go) from this shared folder.
(One time, it have been a misclick and did a move to another folder, the other time was suppr. by mystake)
When this action is done, very quickly the Nextcloud Client get this mouvement and write it in the server.
A few second after, the other clients delete this folder.
Too bad, they didn’t had an alert saying, you are changing 93Go of your Nextcloud Folder, are you sure ?
So they get aware of that when they needed to enter inside this folder some hours after.
I had to go to the trashbin of the main user of the share, and bring back to life.
Another problem, one of the 5 users live in another city far from 150Km, and lost those 93Go, the server is under an LTE modem with a quota of 100Go by month, it’s impossible to make the download back to that user, she needs to go into the lan network at 150Km and get another sync.

It would be great if the client (OS X, Windows, Linux) could have an option in General TAB, with a case : Halt sync before modifying more than X Go. And if this threshold is reached during a sync, it halt and a warning window will appear in the frontground asking if the user want to continue or to pause in order to correct it.
This option should be OFF by default, and can be activated by the user itself.

This option could also be useful during a ransomware attack, because the ransomware protection app works only with the web interface.
What do you think about that, is this a good idea ?

2 Likes

Could you just find it in the Nextcloud user’s trash?

You probably don’t want to jeopardize that, so what I do with sync clients that may delete files I don’t want deleted is I will walk very far away with the computer or remove any potential of it connecting to a network where it can see the server. Then I copy the file to a directory out of the sync folder. Also, something with great snapshotting abilities like ZFS is a lifesaver for this kind of stuff. There are a lot of things you could do with snapshots

It’s not the problem to find this folder back.
The server have a backup and a trashbin.
The problem is the folder have been deleted on all client, and then the server copy again 93Go to 4 clients at the same time. It takes minimum 2 hours, it’s long and then there is a problem with the client who isn’t in the lan network.

Halt sync on the client before will let the server cool and won’t affect the client.

Then I’d say best thing would be to disable networking before boot. If these are windows clients you could disable NC at boot from safe mode without networking

I think you didn’t understand well.
I propose a new feature for an ease of use for sysadmin and user.
The user should not think of turn off networking, the nextcloud client is really fast to delete before deplug the câble. The NC client should halt the sync and ask what to do, continue or cancel. The user will have just to click or call the sysadmin but other users won’t be affected.

Oh my bad I didn’t see the feature tag :slight_smile:

Yes

I just resolve the problem with the trashbin, but it is annoying for users because of the time lost with the sync. So i put a request feature, if it welly apreaciated i will post it on GITHUB.

I think that would be a great thing to post on GitHub to be honest. I have encountered similar errors too myself (though I learned my lesson using syncthing, which I used before this)

I put an github issue : https://github.com/nextcloud/client/issues/68

I see the use of this request, handling this in a user-friendly way is not as easy. You could keep all the files, but how do you handle the situation if the files were really deleted, or some were really deleted others only by accident? What happens, if someone edited the files which were supposed to be deleted? There should be a clear way how to go back in sync with the server.

Other idea: Just mark the files for deletion and carry out the deletion on the clients with a delay of 24/48h (perhaps mark them before differently on the client to make the users aware of the situation). If a user changes a file, unmark it from deletion.

Yes, it was just my first thought, because my client had this problem twice.

The Alert window can have the detail of the folders/files who initiate this alert like :
Deletion of folder /Teamgroup/2017/Client-A (15Gb)
Deletion of folder /Archive 2016/Client-B (22Gb)
Moving folder /Teamgroup/2016/Client-E to /Teamgroup/2016/Client-F (11Gb)
Then the user will understand what is it about, and will click Yes it’s really my will, or No let the sync pause.

A good thing to do it’s when the user say No, the folders/files will be with the “!” logo, easy to navigate so.
Then when the user finish to make its folders/files clean, it clicks on the nextcloud client logo, and resume the sync…

I think this would be a usefull feature. And really not too difficult. As @Nemskiller writes, an option in the sync client to ask for confirmation if a single delete operation would delete more than N Gb. Then a user would think twice, and maybe think OMG that’s not what I meant, and cancel. Which would save a large amount of pain for other users, especially those with a slow connection.

How about an option in the sync client:

Ask for confirmation before synchronizing modifications/deletions of more than ___ files
(where ___ is a numeric value)

They probably prefer to have a way that works for everybody rather than adding too many options. And as I said, there are additional questions, what do you do with the files that you don’t want to delete on the client (only keep only the client, resync)? If you don’t resync and you change the files, then resync, or move it out ot the folder.

I think the best way is to discuss this with the developers on github. I don’t know the current status of the desktop client, it seems they are working hard to get the client-side encryption in, so other features probably have less priority.