Purging WebGUI logs
The purge.sh
script either archives or purges processed access log files and admin log files that are stored in the /opt/pingidentity/webgui/logs/access/
and /opt/pingidentity/webgui/logs/admin/
directories respectively.
About this task
Located in the /opt/pingidentity/webgui/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 script using the WebGUI command line.
Example:
/opt/pingidentity/webgui/util/purge.sh -d 1 This will delete the logs in /opt/e2e/pingidentity/webgui/logs/admin and /opt/e2e/pingidentity/webgui/logs/access that are older than 1 days. Are you sure (yes/no): yes Removing /opt/e2e/pingidentity/webgui/logs/admin/admin.log.2020-04-08 : last changed at Wed Apr 8 17:07:49 UTC 2020 removing /opt/e2e/pingidentity/webgui/logs/access/access.log.2020-04-08 : last changed at Wed Apr 8 19:03:31 UTC 2020 Done
When the
purge
script is run, the log files are permanently deleted. Hence it is recommended to always back up the files before deleting. -
To force delete the WebGUI 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. In this example, the script force purges the WebGUI log files while keeping log files of 2 days./opt/pingidentity/webgui/util/purge.sh -d 2 -f
-
-
To archive logs older than the specified number of days to secondary storage, use the
-l
option thepurge.sh
script and include the path of the secondary storage to archive log files.Example:
In this example, log files older than
2-days
are archived to thebackup
directory. To automate log archival, add the script to acron
job./opt/pingidentity/webgui/util/purge.sh -d 2 -l /backup/