purge.sh script either archives or purges processed access log files and
admin log files which are stored in the
/opt/pingidentity/webgui/logs/admin/ directories respectively.
purgescript is run, the log files are permanently deleted. Hence it is recommended to always backup the files before deleting.
purgescript deletes logs older than the specified number of days. Run the script using the webgui command line.
/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
Force delete: You can force delete the webgui log files by using the
-f option with the
purge.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
In the above 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
External log archival
purgescript can also archive logs older than the specified number of days to secondary storage. Use the
-loption and include the path of the secondary storage to archive log files. For example.
/opt/pingidentity/webgui/util/purge.sh -d 2 -l /backup/
In the above example, log files older than
2-days are archived to
backup directory. To automate log archival, add the script to a