Located in the /opt/pingidentity/dataengine/util directory, the purge script deletes logs older than the specified number of days.

Note:

The number of days specified should be between 1-365 days.

  1. Run the purge script using the Dashboard command line.
    /opt/pingidentity/dataengine/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/dataengine/util/purge.sh -d 3
    This will delete the data in /opt/pingidentity/dataengine/logs which is older than 3 days.
    Are you sure (yes/no): yes
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-07 : last changed at Sat Feb  9 00:29:43 EST 2019
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-09 : last changed at Mon Feb 11 00:29:48 EST 2019
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-08 : last changed at Sun Feb 10 00:29:56 EST 2019
    Done.
    Note:

    When the purge script is run, the log files are permanently deleted from the /opt/pingidentity/dataengine/logs directory. Always back up the files before deleting.

  2. To force delete the Dashboard log files:
    1. Use the -f option with the purge.sh script.
      When using this option, the script does not check for confirmation to purge the log files.
    2. Use the force purge option with the -d option to provide the number of days of logs to keep.

    The following snippet shows an example of the force purge and -d option:

    /opt/pingidentity/dataengine/util/purge.sh -d 3 -f
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-07 : last changed at Sat Feb  9 00:31:26 EST 2019
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-09 : last changed at Mon Feb 11 00:31:30 EST 2019
    removing /opt/pingidentity/dataengine/logs/dataengine.log.2019-02-08 : last changed at Sun Feb 10 00:31:35 EST 2019
    Done.
    
  3. To archive logs older than the specified number of days to secondary storage, use the -l option with the purge.sh script and include the path of the secondary storage to archive log files

    In this example, log files older than 3-days are archived to the tmp directory. To automate log archival, add the script to a cron job.

    /opt/pingidentity/dataengine/util/purge.sh -d 3 -l /tmp/