Cleaning up component versions

You can configure the server to reduce the number of component versions by archiving old versions. You can specify global cleanup settings and cleanup settings for individual components.

Procedure

  1. Specify the global cleanup settings:
    1. Click Settings > System Settings.
    2. Under Artifact Cleanup, in the Days to Keep Versions field, specify the minimum age in days to save a component version. For example, to keep all component versions that are five days old or newer, specify 5. If you specify -1, all versions are saved, regardless of the setting in the Number of Versions to Keep field.
    3. In the Number of Versions to Keep field, specify the minimum number of versions to keep. For example, to save the five most recent component versions, specify 5. If you specify -1, all versions are saved, regardless of the settings in the Days to Keep Versions field.
      When the server runs the cleanup, it deletes or archives all component versions that are older than the minimum age; however, the server retains at least the number of versions in the Number of Versions to Keep field.
      Note: All versions that meet these criteria are archived, including inactive versions and versions that are part of snapshots.
    4. Optional: To archive component versions instead of deleting them, in the Archive Path field, specify where to store the archived component versions. If you leave this field blank, component versions that meet the cleanup criteria are permanently deleted.
    5. To preview the component versions that will be archived the next time an archive file is created, on the System Settings tab, click the Preview Version Cleanup link and select a component.
    6. Click Save.
  2. Optional: Specify cleanup settings for individual components. These settings override the global settings.
    1. Click Components, click a component, go to the Configuration tab for the component, and then click Basic Settings.
    2. Clear the Inherit Cleanup Settings check box.
    3. In the Days to Keep Versions field, specify the minimum age in days to save a component version.
    4. In the Number of Versions to Keep field, specify the minimum number of versions to keep.
    5. Click Save.
  3. Optional: Specify cleanup settings for individual environments. Environment cleanup settings apply to components that are deployed to a specific environment.

    The environment cleanup settings add to the global cleanup settings or component cleanup settings. For example, assume that a component cleanup setting archives versions that are older than 30 days and an environment cleanup setting archives versions that are older than 60 days. In this case, versions that are deployed to the environment are not archived until they are 60 days old.

    In other words, versions are not archived until no component or environment has settings that preserve them.

    1. Click Applications, click an application, click an environment, go to the Configuration tab, and click Basic Settings.
    2. Clear the Inherit Cleanup Settings check box.
    3. In the Days to Keep Versions field, specify the minimum age in days to save a component version.
    4. In the Number of Versions to Keep field, specify the minimum number of versions to keep.
    5. Click Save.

Results

Each day at the hour that is specified in the Hour to Clean Versions field, the server deletes or archives component versions that meet the cleanup criteria. The component versions are no longer shown on the Versions tab for the component.

To see archived component versions, click Settings > System Settings, select the Enable "Show Inactive" Links check box, and click Save. Now, the Version tab of the component has a check box that is labeled Show Inactive Versions.

To restore an archived component version, see Restoring archived component versions.


Feedback