Bug 10900

Summary: SARG: Need cleanup script
Product: IPFire Reporter: Michael Tremer <michael.tremer>
Component: ---Assignee: Assigned to nobody - feel free to grab it and work on it <nobody>
Status: CLOSED DEFERRED QA Contact:
Severity: - Unknown -    
Priority: - Unknown - CC: blago.culjak, peter.mueller
Version: 2Keywords: GoodFirstBug
Hardware: unspecified   
OS: Unspecified   

Description Michael Tremer 2015-07-17 17:52:13 UTC
The SARG reports accumulate lots of data and require lots of disk space and also create so many files that inodes are running out on the /var partition with ext4.

A script should regularly discard old reports.

60 days and 8 weeks back (respectively) should be enough.
Comment 1 Blago Culjak 2015-10-17 07:56:19 UTC
Hello Michael,
I was going to take this bug, it would be my first one, if I understood correctly, the script should run as cron job, cleaning out older files then 60 days/8 weeks.

My idea was thas cron job from /etc/fcron.daily/sarg-reports cleans out /var/log/sarg/daily, older then 60 days. Same thing for weeks/months.

Is that acceptable?
Comment 2 Michael Tremer 2015-10-30 17:07:21 UTC
(In reply to Blago Culjak from comment #1)
> Hello Michael,
> I was going to take this bug, it would be my first one, if I understood
> correctly, the script should run as cron job, cleaning out older files then
> 60 days/8 weeks.
> 
> My idea was thas cron job from /etc/fcron.daily/sarg-reports cleans out
> /var/log/sarg/daily, older then 60 days. Same thing for weeks/months.
> 
> Is that acceptable?

This is a good approach to solve this problem. We have something similar for dma. Maybe that is a good start and you can work your way from there.

http://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=config/dma/dma-cleanup-spool;h=92af30cc8232e5438c71ea0a0fa24878a7067df5;hb=HEAD
Comment 3 Peter Müller 2017-11-08 16:43:22 UTC
Is this bug sill valid? (Currently cleaning up the bug list, hope you don't mind. :-) )
Comment 4 Peter Müller 2019-10-13 10:43:37 UTC
Closing this as there was no reply. If it is still valid and someone interested to work on this, please reopen.