From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] crontab: add periodic cleanup the collectd RRD (graphs) Date: Thu, 25 Aug 2022 11:48:39 +0100 Message-ID: In-Reply-To: <20220825003129.3552746-1-jon.murphy@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8226126610614836473==" List-Id: --===============8226126610614836473== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Jon, Thanks for the patch. Sorry if this sounds like a stupid question, but what is the rationale for th= is? -Michael > On 25 Aug 2022, at 01:31, Jon Murphy wrote: >=20 > - Created (mostly) for old openvpn graphs > - RRD removed when no graph modification for +365 days > - chosen since graph max out is 365 days > - fcron job runs once per week > - chosen since this is just a cleanup and it doesnt need to run everyday > Note: logging can be added if needed. >=20 > Signed-off-by: Jon Murphy > --- > config/cron/crontab | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/config/cron/crontab b/config/cron/crontab > index b727531fc..7088e0b75 100644 > --- a/config/cron/crontab > +++ b/config/cron/crontab > @@ -80,5 +80,8 @@ HOME=3D/ > # Cleanup the mail spool directory > %weekly * * /usr/sbin/dma-cleanup-spool >=20 > +# Cleanup the collectd RRD (graphs) > +%weekly * * /bin/find /var/log/rrd -mtime +365 -type f -name '*.rrd' -dele= te -o -type d -empty -delete > + > # Update DNS trust anchor > %daily,random * * @runas(nobody) /usr/sbin/unbound-anchor -a /var/lib/unbou= nd/root.key -c /etc/unbound/icannbundle.pem > --=20 > 2.30.2 >=20 --===============8226126610614836473==--