Group Folders - delete the contents of the recycle bin

Hi everyone,

I have a Nextcloud 17.03 with about 30 users. We used the “Group Folders” plugin to manage rights, access and well prioritize everything. No worries about that, everything works very well. I recently had a disk space storage alert, and after various investigations, it turns out that the “trash” folder of the group folders is more than 40G.

du -hs __groupfolders/trash
46G __groupfolders/trash

How can I empty this recycle bin to recover disk space?

Knowing that I have already done :

occ files:scan --all
occ trashbin:cleanup --all-users

To empty the trash of user profiles but it did not affect the __groupfolders/trash. Other manipulations were performed but it didn’t work.

I found this issue on the net: https://github.com/nextcloud/server/issues/13380

But don’t worry, we still have a way to empty the folders’ trash? Can’t we just get stuck with this?

Thank you in advance.

Maybe I can manually delete the contents of this folder, and then re-launch an indexing on the Nextcloud side? Is this part of good practice or will I be bothered with it?

The trash can be emptied, but you also have to take care of the referneces in occ_filecache and oc_group_folders_trash.
But this should be done from from a task not manually - maybe you can ask for an extension in the group_folders project?

Hi,

Thanks for quick answer :slight_smile:

The trash can be emptied, but you also have to take care of the referneces in occ_filecache and oc_group_folders_trash.

How can I do that ? Are there any specific manipulations/commands to do?

But this should be done from from a task not manually - maybe you can ask for an extension in the group_folders project?

I agree with that, I’m going to offer it as a feature.

If you ask that question - you should not do it. :smiley:
Honest - you have to do a delete entry in the database where path is like __groupfolders/trash/%
So if you’re not sure about database operations - don’t do it (or at least dump the database before manipulations)

I think that would be best. Something like the trash cleanup for usual files.

Um, I’m really not sure I want to do this on a production server with so much data! I’m going to delete some files by hand, and run an index again to see what it looks like.

any news on that? I have the same problem and didn’t find a working solution for a productive system yet. It seems to be a problem well known over a year, but does not got fixed :roll_eyes:

1 Like

Hi,

No news from last time…
You can still delete the data that have been deleted from the Group Folders through the trash can of the web interface via the administrator account (or the account that created and set up the Group Folders) but still nothing via the utility occ …

Hey,
we opened a bounty on this missing function.
Please spread the voice and contribute as you can:

2 Likes

There is a good working workaround, posted by “bastiencyr” on Bountysource.com

I have a provisional solution to empty the trashbin. Do this :
1. select the mark all button and suppress all (only files NOT in group folder will be removed)
2. select the mark all button again, and uncheck only one file on the list.
3. Remove all files (except the one last file)
4. it works for me

Hi everyone,

A function has recently been added to address this issue.

sudo -u <nextcloud_user> php /var/www/nextcloud/occ groupfolders:trashbin:cleanup

Tested on my side, and it’s all good! Thanks to the developers :slight_smile:

References :

2 Likes

That‘s nice, well done. It’s a better workaround or a admin solution, but no solution for normal users. Would love to see it implemented in Nextcloud GUI.

1 Like