We're frequently asked about how one might manage SVM On-Prem backup and log files. This article lays out one possible option.
How should an on-premises CSI customer manage their backup and log files?
One option would be to utilize a utility called LogRotate. This tool comes packaged by default in many Linux distributions including Red Hat Enterprise. This tool operates as a scheduled task and when provided the appropriate information can automatically 'rotate' files. This gives some much-needed automation to a process that can be somewhat arduous.
How does it work?
Generally speaking, the utility runs as part of a task set in crond. That would typically be located in /etc/cron.daily/logrotate. Configuration of the utility is found in its configuration file located in /etc/logrotate.conf.
A user can place their configuration options there or alternatively one can place application specific (in this case CSI) files in /etc/logrotate.d (you'll find this statement in /etc/logorate.conf indicating this: 'include /etc/logrotate.d').
Bear in mind this is a simple example, it's not meant to demonstrate a recommended solution. Log and backup rotation should be put into place in a manner that fits with your organization's policies and standards. You may also wish to control log files for Apache and Mysql/MariaDB. For those, I would refer you to the outside resource links in the additional information section.