I have made the update to version 13.0.2. I have configured my config.php file to delete the files in the trash bin when it reaches 2 days of deletion and has not worked. The configuration was: ’trashbin_retention_obligation’ => ‘1, 2’,
What can I do, I do not want to consume disk space unnecessarily.
Greetings to this nice community and thanks once again to the nextcloud developers
I realized, that my trash bin never got deleted. Which makes sense based on the documentation, the default setting 'trashbin_retention_obligation' => 'auto' and my users who do not have any quota being configured.
Now I changed the setting to 'trashbin_retention_obligation' => '30,180',in config.php and even after deleting files, adding new files and ensuring the the cron job is working correctly every 5 minutes, I still have files in my trash bin older then 180 days. Actually I have still files in there from the date I installed the trash bin app.
I also read lots of articles and the documentation about the issue, but honestly saying, there werer so many different opinions and views.
How can I troubleshoot this, how can I enforce the deletion of old files ?
There was a ticket, but seems it is solved (as for me). If it does not work, then please open an issue, or comment on that it was not solved (for the second I’m not sure).
You know what I find out.
If you are using Find it shows you OC modification date, but not when it was deleted in Nextcloud, e.g. I run your command to check:
# sudo -u www-data php /var/www/nextcloud/occ trashbin:expire
No expiry configured.
But, I can find a lot of old files:
# find User/files_t*/ -type f -mtime +180 | wc -l
2443
# find User/files_t*/ -type f -mtime +180 -exec ls -lah {} \; | head
-rw-r----- 1 www-data www-data 1.8M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/20150719_152641.jpg
-rw-r----- 1 www-data www-data 2.1M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/IMG_20160327_112740.jpg
-rw-r----- 1 www-data www-data 2.5M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/IMG_20160327_105506.jpg
-rw-r----- 1 www-data www-data 204M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/VID_20160327_111535.mp4
-rw-r----- 1 www-data www-data 2.3M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/IMG_20160327_110422.jpg
-rw-r----- 1 www-data www-data 1.2M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/IMG_20160327_111744.jpg
-rw-r--r-- 1 www-data www-data 332M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/VID_20160327_111924.mp4
-rw-r----- 1 www-data www-data 6.7M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/edit/IMG_0149.JPG
-rw-r----- 1 www-data www-data 8.5M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/edit/IMG_0158.JPG
-rw-r----- 1 www-data www-data 7.6M Jan 23 2018 User/files_trashbin/files/Dropbox-User Local.d1565094251/Share/Folder/edit/IMG_0040.JPG
Then I change the config to delete all files after 180 days ('trashbin_retention_obligation' => '14, 180',) and run command again:
I did the same you did.
The find command on a specific user just gave me 4 files. the oldest content of the files_trashbin folder from 2019-04-18. Still more than 6 month.
But looking at the WebUI, the oldest content ist from 2019-01-13. I searched for that file in the nextcloud data directory and figured out that this folder is located in a __groupfolders/trash/
This would mean, that the trashbin_retention_obligation works for my files located directly inside files but not for the groupfolders - as it seems.
The one file from 2019-04-18 could also be moved there just some minutes ago, or because it is a hidden file starting with a dot it was not deleted. I will have a look at it tomorrow.
I read this thread, and it seems to me it is a nasty issue. It’s a pity, that the group folders app does not obey the trashbin retention time. Anyway I’ve proposed a solution at github. Maybe someone has mercy;-)
außer uns beiden, scheint keiner irgendwie das Thema mal in die Hand zu nehmen. Ja ich weiß, viele haben viel zu tun, aber ich meine so einen einfacher workaround soll doch möglich sein? z.B. automatisches leeren des groupfolder trashbins. würde sogar auf Systemebene reichen. z.B. alle Dateien die älter sind als etc…
I think, most people do not realize this is even the case of group folders. This is my assumption, but no response from any dev or support or whoever is involved into group_folders makes me a little sad.
Habt ihr hierfür eine Lösung gefunden?
Hab auch das Problem mit dem Papierkorb in den Gruppenordner trashbin_retention_obligation und occ trashbin:expire greifen nicht
Sorry, meine war GroupFoulders zu entfernen, es machte mir über die Laufzeit immer wieder Probleme. Jetzt gibt es einen Shared Folder, da klappts auch mit dem Nachbarn
Das wäre mittlerweile viel Umstellung
Überlege mir schon aus Linux direkt den Ordner zu überwachen und alte Files zu löschen.
Weis aber nicht wie sich das auf die Datenbank auswirkt
Dabei hab ich gesehen, dass es nun auch schon einen occ Befehl gibt, um den Papierkorb vom Gruppenorder zu löschen … aber leider nur der gesamte und nicht nur alte Elemente