Purging Dashboard logs
The purge.sh
script either archives or purges processed access log files that are stored in the /opt/pingidentity/dataengine/logs
directory.
About this task
Located in the /opt/pingidentity/dataengine/util
directory, the purge
script deletes logs older than the specified number of days.
The number of days specified should be between 1-365 days. |
Steps
-
Run the
purge
script using the Dashboard command line.Example:
/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.
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. -
To force delete the Dashboard log files:
-
Use the
-f
option with thepurge.sh
script.
When using this option, the script does not check for confirmation to purge the log files.
-
Use the force purge option with the
-d
option to provide the number of days of logs to keep.Example:
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.
-
-
To archive logs older than the specified number of days to secondary storage, use the
-l
option with thepurge.sh
script and include the path of the secondary storage to archive log filesExample:
In this example, log files older than
3-days
are archived to thetmp
directory. To automate log archival, add the script to acron
job./opt/pingidentity/dataengine/util/purge.sh -d 3 -l /tmp/