Managing SVM On-Prem Backups and Logs

Managing SVM On-Prem Backups and Logs

Summary

We're frequently asked about how one might manage SVM On-Prem backup and log files.
This article lays out one possible option.

Question

How should an on-premises CSI customer manage their backup and log files?

Answer

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').

An Example Configuration

/usr/local/Secunia/csi/log/*.log {
        rotate 7
        daily
        compress
}

 /usr/local/Secunia/csi/backup/* {
        rotate 2
        daily
        compress
}

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.

Additional Information

Outside Resource Links

Log Rotate


https://support.rackspace.com/how-to/understanding-logrotate-utility/

https://linux.die.net/man/8/logrotate

Apache Rotation

http://www.thegeekstuff.com/2011/07/rotate-apache-logs/ <- this example's file paths will not match the ones on your machine to the logs. A default Apache install on Red Hat puts its logs in /etc/httpd/logs/.

MySQL/MariaDB Rotation

https://administratosphere.wordpress.com/2011/12/02/log-rotation-for-mysql/

Was this article helpful? Yes No
No ratings
Version history
Revision #:
3 of 3
Last update:
‎Sep 25, 2019 08:00 PM
Updated by:
 
Contributors