A purge.sh script either archives or purges processed access log files.
The access log files are stored in the /opt/pingidentity/abs/data directory.
When the purge script is run, the processed access log files are permanently deleted from the /opt/pingidentity/abs/data directory. Always backup the files before deleting.
Located in the /opt/pingidentity/abs/util directory, the purge script deletes logs older than the specified number of days. Run the script using the API Behavioral Security (ABS) command line. For example:
/opt/pingidentity/abs/util/purge.sh -d 3
In the above example, purge.sh deletes all access log files older than 3 days. Here is sample output.
/opt/pingidentity/abs/util/purge.sh -d 3
This will delete the data in /opt/ pingidentity/abs/data which is older than 3 days.
Are you sure (yes/no): yes
removing /opt/pingidentity/abs/data/2018-04-10-11_21/9k2unv5l2bsgurneot3s3pmt03/ : last changed at Mon Jan 10 11:32:31 IST 2018
removing /opt/ pingidentity/abs/data/2018-04-10-11_21/ilq67a3g5sve2pmpkkp271o37c/ : last changed at Mon Jan 10 11:32:31 IST 2018
External log archival
The purge script can also archive logs older than the specified
number of days to secondary storage. Use the -l
option and include the
path of the secondary storage to archive log files. For example:
/opt/pingidentity/abs/util/purge.sh -d 3 -l /tmp/
In the above example, log files older than 3-days
are archived to the
tmp directory. To automate log archival, add the script to a
cron
job.