Trash bin retention and threshold configuration

i’m trying to configure trash bin app but I found conflicting info:
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
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 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

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)
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.

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