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
- Specify the global cleanup settings:
- Click .
- 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.
- 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.
- 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.
- 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.
- Click Save.
- Optional: Specify cleanup settings for individual
components. These settings override the global settings.
- Click Components, click a component,
go to the Configuration tab for the component,
and then click Basic Settings.
- Clear the Inherit Cleanup Settings check
box.
- In the Days to Keep Versions field,
specify the minimum age in days to save a component version.
- In the Number of Versions to Keep field,
specify the minimum number of versions to keep.
- Click Save.
- 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.
- Click Applications, click an
application, click an environment, go to the Configuration tab,
and click Basic Settings.
- Clear the Inherit Cleanup Settings check
box.
- In the Days to Keep Versions field,
specify the minimum age in days to save a component version.
- In the Number of Versions to Keep field,
specify the minimum number of versions to keep.
- 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 , 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.