From: Jon Murphy Date: Thu, 25 Aug 2022 00:31:29 +0000 (-0500) Subject: crontab: add periodic cleanup the collectd RRD (graphs) X-Git-Tag: v2.27-core171~45 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=73b404314372b36c788b709bcf18793f0a1abcbc crontab: add periodic cleanup the collectd RRD (graphs) - 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. Signed-off-by: Jon Murphy Reviewed-by: Bernhard Bitsch Reviewed-by: Michael Tremer --- diff --git a/config/cron/crontab b/config/cron/crontab index b727531fc2..7088e0b750 100644 --- a/config/cron/crontab +++ b/config/cron/crontab @@ -80,5 +80,8 @@ HOME=/ # Cleanup the mail spool directory %weekly * * /usr/sbin/dma-cleanup-spool +# Cleanup the collectd RRD (graphs) +%weekly * * /bin/find /var/log/rrd -mtime +365 -type f -name '*.rrd' -delete -o -type d -empty -delete + # Update DNS trust anchor %daily,random * * @runas(nobody) /usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem