I’ve Nextcloud running as Snap package on Ubuntu 22.04 LTS. While setting up backup I found that there are lots of deleted files and folders older than 1 year which I don’t want to retain and don’t want to backup. So I read the docs and the forum and found that I can set
trashbin_retention_obligation
to let Nextcloud remove those files and folders after a certain while.
So I set the parameters as the docs explain:
sudo nextcloud.occ config:app:set files_trashbin trashbin_retention_obligation --value='90, 120'
which should “keep files and folders in the trash bin for at least 90 days and delete when exceeds 120 days (note: files will not be deleted automatically if space is needed)”
Of course I’ve checked the parameter afterwards:
sudo nextcloud.occ config:app:get files_trashbin trashbin_retention_obligation
90, 120
I waited for the next Cron run and… all deleted files are still there.
I tried multiple other values but… all deleted files are still there.
Then I ran (which should, according to the docs, “expire versions”)
sudo nextcloud.occ trashbin:expire
which told me:
Auto expiration is configured - keeps files and folders in the trash bin for 30 days and automatically deletes anytime after that if space is needed (note: files may not be deleted if space is not needed)
It looks like my configuration is not taken into account.
In the docs I’ve also found a command to “Activate background job” and ran it:
sudo nextcloud.occ config:app:delete files_trashbin background_job_expire_trash
which told me:
Config value background_job_expire_trash of app files_trashbin deleted
This doesn’t sound to me like something has been activated, it sounds like it has deleted the background job!?
I’ve also set the last_run
property in the MySQL database table oc_jobs
as described in another thread without success.
I’ve read countless threads in this forum and it looks like this is not only a mystery for me and it also keeps causing headaches to a others during the last years.
I’m glad for everyone who can help to shed a light on this!
Cheers,
SiKr