Trash bin retention and threshold configuration

iā€™m trying to configure trash bin app but I found conflicting info:
here https://docs.nextcloud.com/server/12/user_manual/files/deleted_file_management.html
here they say:
"To ensure that users do not run over their storage quotas, the Deleted Files app allocates a maximum of 50% of their currently available free space to deleted files. If your deleted files exceed this limit, Nextcloud deletes the oldest files"
but here
https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#deleted-items-trash-bin
they do not speak anymore about 50% threshold.
How do these two parts interact?
Thanks in advance

The way I understand this is that thereā€™s always a hardcoded (not configurable) limit where deleted files can never use more than 50% of the quota. At the same time, thereā€™s a time quota which is configurable. So if deleted files exceed either threshold, they are removed.

If you feel like the size quota should be configurable, you should check GitHub.com/nextcloud/server/issues to see if thatā€™s already in the list, and add a new feature request if itā€™s not.

1 Like

Thanks very much,
I also think itā€™s as you say, but my tests seem to say the opposite.

using ā€˜trashbin_retention_obligationā€™ => ā€˜1,2ā€™,
or ā€˜trashbin_retention_obligationā€™ => ā€˜autoā€™,
For example,I created a user with a quota of 20mb, I loaded a file of 17mb and I deleted it, but it still remains in the trash even if I add and delete other files (the trash also reaches 10 times the presumed maximum size of 10mb).

when I remove ā€˜trashbin_retention_obligationā€™ =>ā€¦from the config.php file, the 50% threshold seems to work properly.

Have you tried it? Does it work correctly in your instance?

I resolved, I had activated the cron every 15 minutes, then the check on the 50% threshold is done every 15 minutes
Thanks

1 Like

Actually I have not tried it, but glad to hear itā€™s working as you expected after cron runs. :slightly_smiling_face:
I wonder if there is a way to change the 50% threshold though.

maybe this?

Nextcloud seems just to respect the thrash bin quota set on Trashbin.php (DEFAULTMAXSIZE = 50; i.e 50% of my remaining account quota)
from:
Trash bin retention doesn't have effect
I have not already tried it

Thatā€™s pretty straightforward. I just set mine to ā€˜auto, 30ā€™ so weā€™ll see how that goes after cron runs.

another question, the 50% limit is about 50% of total user quota or 50% of user quota currently unused?
for example, a user who uses 9 of 10 GB has a 5 GB trash bin or a 0,5GB trash bin (50% of free space: 1GB )?
from my tests it seems that it is calculated on the total quota.
Thanks

Thatā€™s another good question. The documentation seems to indicate it should be 50% of the free space remaining, although thatā€™s not what your tests are showing. Also I would wonder what happens when you completely fill up your quota (no free space). I would need to test this to see how it works out for me.

1 Like

Somehow it does not work for me in NC 13.05, file will be deleted, even if I configure to save it.

 Info	files_trashbin	remove "xxx.zzz" (177726B) to meet the limit of trash bin size (50% of available quota)

my config:

  'trashbin_retention_obligation' => '7, auto',
  'versions_retention_obligation' => '7, auto',

I have file versions saved, but I do not have any files in trash-bin.

It was easy for me to do this! Follow this steps and on my server it works!

  1. Deactivate APP Deletet Files
  2. Reboot your Nextcloud
  3. Activate APP Deletet Files
  4. Delete one File
  5. Trashbin was working