[GH-ISSUE #230] [Feature Request] Cleanup cronjob #182

Closed
opened 2026-02-26 09:36:33 +03:00 by kerem · 2 comments
Owner

Originally created by @Sebbo94BY on GitHub (Jul 5, 2017).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/230

It doesn't look like, that ViMbAdmin cleans up temp or very old files:

$ ls -lh var/session/ | grep -v sess_
total 2.0G

$ ls -lh var/session/ | wc -l
513939

This is the result after 11 months.

I couldn't found any information regarding this in the documentation. Does this feature already exist?

The other folders should be also cleaned up, but in my case there are only a few and small files:

$ ls -lh var/
total 29M
drwxrwxr-x 2 www-data www-data 4,0K Apr 14  2016 cache
drwxrwxr-x 2 www-data www-data 4,0K Apr 14  2016 log
drwxrwxr-x 2 www-data www-data  29M Jul  5 22:15 session
drwxrwxr-x 2 www-data www-data  12K Apr 17  2016 templates_c
drwxrwxr-x 3 www-data www-data 4,0K Apr 14  2016 tmp
$ find var/cache/ -exec du -sh {} \;
8,0K    var/cache/
4,0K    var/cache/.hello-git
$ find var/log/ -exec du -sh {} \;
6,2M    var/log/
4,0K    var/log/.hello-git
6,2M    var/log/vimbadmin.log
$ find var/tmp/ -exec du -sh {} \;
28K     var/tmp/
24K     var/tmp/captchas
4,0K    var/tmp/captchas/.hello-git
8,0K    var/tmp/captchas/623fc233f2f495542a6d054d4cf64073.png
8,0K    var/tmp/captchas/ef8400ba12281eedb6d607b386110b9a.png
$ find var/templates_c/ -exec du -sh {} \;
448K    var/templates_c/
4,0K    var/templates_c/acaae09e028348cd0b55ecf560ae352abee573ba_0.file.aliases.js.php
16K     var/templates_c/e8c173a77cc84bbfd7997c34795458d851365fba_0.file.add-edit.phtml.php
20K     var/templates_c/05308eabf648c24ca0d078309dc7493d364443a5_0.file.list.js.php
4,0K    var/templates_c/48534422885fa4959e6ba933bc52d342c11907f2_0.file.add.phtml.php
4,0K    var/templates_c/218ff0c13c520c1842959fb2be7933cf13c615a6_0.file.header-css.phtml.php
8,0K    var/templates_c/b5dac9dc33667734fa993e5170f146bae2e3eff7_0.file.header.phtml.php
20K     var/templates_c/2fd79de436f3936c25880a22dfe0d4b4d4a274c6_0.file.list.phtml.php
8,0K    var/templates_c/11e873a1973e80e0279d6a3c981a76f9f6c18f0a_0.file.aliases.phtml.php
4,0K    var/templates_c/76be56fb0b0695952c34db9bfae71bec791e30a8_0.file.change-password.phtml.php
8,0K    var/templates_c/2b1086e6fe40e95801e81f53c52ba76fe263c6d9_0.file.add-edit.phtml.php
8,0K    var/templates_c/2beda7effeb8b3e85d0a978b294a858b0d7194f4_0.file.admins.phtml.php
4,0K    var/templates_c/1556204e1bb02cac111916714e9aa32448f9d0e5_0.file.add.js.php
12K     var/templates_c/e8d77f8867dca58525e7fd0a82f9ceeebd7ab95b_0.file.list.phtml.php
8,0K    var/templates_c/3679b2c2026aac4181052a268280c1a89cc5b70c_0.file.settings.phtml.php
8,0K    var/templates_c/8d338c5a43562dcf0db709fc9c9b0dac339cbbe9_0.file.setup.phtml.php
4,0K    var/templates_c/d925a014c8a1c1b8f9b59cd16b710391f789e248_0.file.element-input.phtml.php
4,0K    var/templates_c/f3c9d3e24660e15adc06e3dbdb7faf17af8096df_0.file.lost-password.phtml.php
4,0K    var/templates_c/a2eb6286e304ab7190e6a54c7e4c278cd330eb7b_0.file.add.phtml.php
4,0K    var/templates_c/c1bc8ca1b9cfdbe9bc0a48728dd815d2f1f2918d_0.file.list.js.php
4,0K    var/templates_c/93e6cfcdd9223a8cc5abe6d2e60697a94804fb95_0.file.list.js.php
4,0K    var/templates_c/.hello-git
20K     var/templates_c/46f5a7bfab5729387c757656d960625edabd5428_0.file.list.phtml.php
4,0K    var/templates_c/d83998b311db20d95493788ba9e6c3f9d26926ad_0.file.add.phtml.php
24K     var/templates_c/878ba230647191db0133e8953be72817f99c8ecb_0.file.add-edit.phtml.php
8,0K    var/templates_c/52a04dc0695c3c238c7f9487d2638e47f459153f_0.file.element-checkbox.phtml.php
.
.
.
Originally created by @Sebbo94BY on GitHub (Jul 5, 2017). Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/230 It doesn't look like, that ViMbAdmin cleans up temp or very old files: ``` $ ls -lh var/session/ | grep -v sess_ total 2.0G $ ls -lh var/session/ | wc -l 513939 ``` This is the result after 11 months. I couldn't found any information regarding this in the documentation. Does this feature already exist? The other folders should be also cleaned up, but in my case there are only a few and small files: ``` $ ls -lh var/ total 29M drwxrwxr-x 2 www-data www-data 4,0K Apr 14 2016 cache drwxrwxr-x 2 www-data www-data 4,0K Apr 14 2016 log drwxrwxr-x 2 www-data www-data 29M Jul 5 22:15 session drwxrwxr-x 2 www-data www-data 12K Apr 17 2016 templates_c drwxrwxr-x 3 www-data www-data 4,0K Apr 14 2016 tmp ``` ``` $ find var/cache/ -exec du -sh {} \; 8,0K var/cache/ 4,0K var/cache/.hello-git ``` ``` $ find var/log/ -exec du -sh {} \; 6,2M var/log/ 4,0K var/log/.hello-git 6,2M var/log/vimbadmin.log ``` ``` $ find var/tmp/ -exec du -sh {} \; 28K var/tmp/ 24K var/tmp/captchas 4,0K var/tmp/captchas/.hello-git 8,0K var/tmp/captchas/623fc233f2f495542a6d054d4cf64073.png 8,0K var/tmp/captchas/ef8400ba12281eedb6d607b386110b9a.png ``` ``` $ find var/templates_c/ -exec du -sh {} \; 448K var/templates_c/ 4,0K var/templates_c/acaae09e028348cd0b55ecf560ae352abee573ba_0.file.aliases.js.php 16K var/templates_c/e8c173a77cc84bbfd7997c34795458d851365fba_0.file.add-edit.phtml.php 20K var/templates_c/05308eabf648c24ca0d078309dc7493d364443a5_0.file.list.js.php 4,0K var/templates_c/48534422885fa4959e6ba933bc52d342c11907f2_0.file.add.phtml.php 4,0K var/templates_c/218ff0c13c520c1842959fb2be7933cf13c615a6_0.file.header-css.phtml.php 8,0K var/templates_c/b5dac9dc33667734fa993e5170f146bae2e3eff7_0.file.header.phtml.php 20K var/templates_c/2fd79de436f3936c25880a22dfe0d4b4d4a274c6_0.file.list.phtml.php 8,0K var/templates_c/11e873a1973e80e0279d6a3c981a76f9f6c18f0a_0.file.aliases.phtml.php 4,0K var/templates_c/76be56fb0b0695952c34db9bfae71bec791e30a8_0.file.change-password.phtml.php 8,0K var/templates_c/2b1086e6fe40e95801e81f53c52ba76fe263c6d9_0.file.add-edit.phtml.php 8,0K var/templates_c/2beda7effeb8b3e85d0a978b294a858b0d7194f4_0.file.admins.phtml.php 4,0K var/templates_c/1556204e1bb02cac111916714e9aa32448f9d0e5_0.file.add.js.php 12K var/templates_c/e8d77f8867dca58525e7fd0a82f9ceeebd7ab95b_0.file.list.phtml.php 8,0K var/templates_c/3679b2c2026aac4181052a268280c1a89cc5b70c_0.file.settings.phtml.php 8,0K var/templates_c/8d338c5a43562dcf0db709fc9c9b0dac339cbbe9_0.file.setup.phtml.php 4,0K var/templates_c/d925a014c8a1c1b8f9b59cd16b710391f789e248_0.file.element-input.phtml.php 4,0K var/templates_c/f3c9d3e24660e15adc06e3dbdb7faf17af8096df_0.file.lost-password.phtml.php 4,0K var/templates_c/a2eb6286e304ab7190e6a54c7e4c278cd330eb7b_0.file.add.phtml.php 4,0K var/templates_c/c1bc8ca1b9cfdbe9bc0a48728dd815d2f1f2918d_0.file.list.js.php 4,0K var/templates_c/93e6cfcdd9223a8cc5abe6d2e60697a94804fb95_0.file.list.js.php 4,0K var/templates_c/.hello-git 20K var/templates_c/46f5a7bfab5729387c757656d960625edabd5428_0.file.list.phtml.php 4,0K var/templates_c/d83998b311db20d95493788ba9e6c3f9d26926ad_0.file.add.phtml.php 24K var/templates_c/878ba230647191db0133e8953be72817f99c8ecb_0.file.add-edit.phtml.php 8,0K var/templates_c/52a04dc0695c3c238c7f9487d2638e47f459153f_0.file.element-checkbox.phtml.php . . . ```
kerem closed this issue 2026-02-26 09:36:33 +03:00
Author
Owner

@barryo commented on GitHub (May 16, 2020):

Hi @Sebi94nbg - I'd happily merge a simple script that would sit int he bin/ to handle this 😉

<!-- gh-comment-id:629628687 --> @barryo commented on GitHub (May 16, 2020): Hi @Sebi94nbg - I'd happily merge a simple script that would sit int he bin/ to handle this 😉
Author
Owner

@Sebbo94BY commented on GitHub (May 17, 2020):

I would prefer a cronjob like these: https://github.com/opensolutions/ViMbAdmin/blob/master/bin/crons/vimbadmin

<!-- gh-comment-id:629820592 --> @Sebbo94BY commented on GitHub (May 17, 2020): I would prefer a cronjob like these: https://github.com/opensolutions/ViMbAdmin/blob/master/bin/crons/vimbadmin
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ViMbAdmin-opensolutions#182
No description provided.