Cronjob to delete old log entries on Identity Suite vApp
search cancel

Cronjob to delete old log entries on Identity Suite vApp

book

Article ID: 190191

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal CA Identity Suite

Issue/Introduction

Is there a way to delete old log files from the CA Identity Manager (Symantec IGA) Virtal Appliance (vAPP) using a cron job?

Environment

Release : 14.x

Component : CA IDENTITY SUITE (VIRTUAL APPLIANCE)

Resolution

Check for an existing crontab and amend if necessary
 
/opt/CA/wildfly-idm/standalone/log > crontab -l
 
if none exists create a new one

/opt/CA/wildfly-idm/standalone/log > crontab -e


The following syntax can be used to delete log files over 30 days and is set to execute daily at midnight (00:00:00).

00 00 * * * sh -c "find /opt/CA/VirtualAppliance/logs/IDM_logs/ /opt/CA/VirtualAppliance/logs/IG_logs/ /opt/CA/VirtualAppliance/logs/IP_logs/ -mtime +30 -name \"*.log*\" -delete"
00 00 * * * sh -c "find /opt/CA/VirtualAppliance/logs/Oracle_logs/ -mtime +30 -name \"*.tr*\" -delete"
00 00 * * * sh -c "find /opt/CA/VirtualAppliance/logs/ConnectorServer_logs/ -mtime +30 -name \"*.log*\" -delete"
00 00 * * * sudo -u imps sh -c "find /opt/CA/VirtualAppliance/logs/ProvisioningServer_logs/ -mtime +30 -name \"*.log*\" -delete"
00 00 * * * sudo -u dsa sh -c "find /opt/CA/VirtualAppliance/logs/Directory_logs/ -mtime +30 -name \"*.log*\" -delete"