Cleaning up process step log files

You can clean up process log files that are generated when you run deployment process steps to free up storage space in the file system.

About this task

When you run an independent process step or process step which is part of a deployment process, the log files are generated. The process step logs are part of the deployment history files, but you can clean up the step log files independent of the deployment history cleanup. By cleaning up the step log files separately, you can retain deployment history and information such as workflow traces and inventory information.
You can clean up the process step logs in the following three ways:
Important: The process step logs cleanup process deletes all logs in the file system that are related to the deployments that you're deleting. The cleanup cannot be undone. It is important that you carefully choose the items that you delete.

For the cleanup process to start and run according to specifications, the cleanup process must be turned on by your administrator in System Settings and the Use Process Step Log Cleanup option is selected in environment settings. By default, the process step log cleanup settings in both the administrator and environment settings are turned off.

The following table shows how the cleanup configuration works based on your selection:
Table 1. Enabling step log cleanup
Enable Process Step Log Cleanup option in System Settings (administrator's setting) Use Process Step Log Cleanup check box in environment settings Result
On Selected Cleanup starts as specified for deployments that are associated with this environment.
On Cleared Cleanup does not start for deployments that are associated with this environment.
Off Selected Cleanup does not start for deployments that are associated with this environment.

An example usage of the cleanup configuration fields is as follows:

If the date is 14 November 2024, and you have used the following settings:

  • Enable Process Step Log Cleanup in System Settings: Enabled
  • Daily Cleanup Start Time in System Settings: 9:00 PM
  • Daily Cleanup Duration (hours) in System Settings: 3
  • Days to Retain Process Step Logs in System Settings: 15
  • Use Process Step Log Cleanup in the environment settings: Enabled
  • Use Default Step Log Retention in the environment settings: Enabled

At 9:00 PM on 14 November 2024, the process step log cleanup begins to run for 3 hours. During the 3 hours, the step logs that are 15 days old and older are deleted.

Notes:
  • You can make changes to the settings after this date and can change it multiple times.
  • This procedure does not impact the process step log files that are part of a running deployment process.

Configuring the system settings

As a system administrator, you can enable and configure the process step clean up settings to delete the old process step log files.

Before you begin

You must have the following permissions to edit the system settings:
  • Web UI > Settings Tab
  • Server Configuration > Edit Basic System Settings

Procedure

  1. In Deploy, click the Settings tab, and then in the System column, click System Settings.
  2. Scroll to the Process History Cleanup area.
  3. Set the Enable Process Step Log Cleanup option to On.
  4. In the Daily Cleanup Start Time field, select the hour to start the daily cleanup process.
  5. In the Daily Cleanup Duration (hours) field, specify the number of hours for the cleanup process to run.
  6. In the Days to Retain Process Step Logs field, specify the number of days to keep the process log files before the cleanup process deletes the logs.
  7. Save your changes.

Results

You have configured the process step log files cleanup in the system settings. When cleanup begins, a progress indicator shows details about the cleanup process.

Configuring individual environment settings

As a user, you can configure the process step clean up settings for a specific environment.

Before you begin

  • You must have the following permissions to edit the process step log cleanup for individual environments:
    • Environment > Edit > Manage Environment Cleanup
    • Web UI > Applications Tab
  • The administrator has enabled the Enable Process Step Log Cleanup system setting.

Procedure

  1. Click Applications, click an application, click an environment, click Configuration, and then click Basic Settings.
  2. Select Use Process Step Log Cleanup.
  3. Perform any one of these steps:
    • Select Use Default Step Log Retention to keep step log files for the number of days that the administrator specified.
    • Clear the Use Default Step Log Retention check box and specify the number of days to keep step logs in the Days to Retain Step Logs field.
  4. Save your changes.

Results

You have configured the process step log files cleanup setting for the environment. When the cleanup begins, a progress indicator shows details about the cleanup process.