Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give warning on deletion of large amount of data #38628

Closed
2br-2b opened this issue Jun 3, 2023 · 4 comments
Closed

Give warning on deletion of large amount of data #38628

2br-2b opened this issue Jun 3, 2023 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: files

Comments

@2br-2b
Copy link

2br-2b commented Jun 3, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

So... I may or may not have seen my life flash before my eyes when I almost deleted my entire file server.

I was planning on emptying the trash, so I opened Nextcloud Files, clicked the trash can, clicked the checkmark to select all of the files, then went to the three dots and clicked the trash icon.

Little did I realize that I hadn't actually clicked the trash icon. I just deleted every file from my Nextcloud root directory.

Fortunately, I'm able to restore these items from the trash, but I'm now having to let this sit the night and hope that none of my shares are broken by deleting then restoring these folders. In addition, I'll have to restore all the folders tomorrow, leading to more personal downtime.

While this is a problem with me and not with Nextcloud, it would be nice if there were a warning if you either delete all of your files or if you delete files >30 or so Gb. Just a "Warning: you are about to delete XX Gb of files. Are you sure you want to continue?" to help people like me :-)

Describe the solution you'd like

It would be nice if there were a warning if you either delete all of your files or if you delete files >30 or so Gb. Just a "Warning: you are about to delete XX Gb of files. Are you sure you want to continue?" to help people like me :-)

Even Ubuntu requires an extra flag before running rm -rf /, so some extra confirmation would be nice!

This could get annoying for some users, but I think the tradeoff is worth it. Even if it's not based on file size and is just there to make sure you don't delete your root directory, anything would be helpful!

Describe alternatives you've considered

Double-checking my file directories!

Additional context
Sigh just giving it the night to finish the deletion, then will spend all day tomorrow restoring the files 😔
All in all though, thank you guys for maintaining Nextcloud!

@2br-2b 2br-2b added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jun 3, 2023
@joshtrichards
Copy link
Member

Hi @2br-2b - I hope the restore process is progressing! I'm sorry to hear that happened.

That's a good shout-out to the default rm -rf / behavior (at least in the GNU edition). I hadn't realized the behavior of rm had changed (for / at least)! I still think of typos leading to an inadvertentrm -rf / as 100% destructive by default (because that's how it used to be).

Anyhow, thanks for sharing your experience (unfortunate as it may be) and suggestion. And I hope things work out for you and your data!

Ref: "Treating / specially" -
https://www.gnu.org/software/coreutils/manual/html_node/Treating-_002f-specially.html

@2br-2b 2br-2b closed this as completed Jun 3, 2023
@2br-2b 2br-2b reopened this Jun 3, 2023
@2br-2b

This comment was marked as resolved.

@joshtrichards
Copy link
Member

Fixed in #43231

@quentinDupont
Copy link

@joshtrichards does this works if I deleted datas of my computer synced ? or just on web client ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: files
Projects
None yet
Development

No branches or pull requests

3 participants