Available options

These options allow you to configure a version retention policy for all applications managed by Console:

  • to retain versions for a specific number of days.
  • or to retain a min or max number of versions per Application
  • optionally delete associated snapshots
Delete the versions if they are older than X day(s)Disabled by default. This option allows you to configure a retention policy that will delete any version for any Application that is older than X number of days.
Keep minimum X version(s) per applicationDisabled by default. This option allows you to configure a minimum number of versions to retain for any given Application.
Keep maximum X version(s) per applicationDisabled by default. This option allows you to configure a maximum number of versions to retain for any given Application.
Delete associated snapshots

Not visible and disabled by default:

  • at least one other version strategy option must be ticked before this option will be visible
  • if at least one snapshot strategy option has been ticked and the settings saved, then this option will not be available.

This option will also delete any snapshots associated to a version that Console determines must be deleted based on your settings. Use with caution!

If you are using embedded Dashboards, the dashboard data will be cleaned up when a snapshot is deleted.

Option priority

All three options can be used in conjunction. The order of priority when multiple options are active is as follows:

  • Keep minimum X version(s) per application
  • Delete the versions if they are older than X day(s)
  • Keep maximum X version(s) per application

Therefore priority is given to ensuring that the minimum number of versions is always retained (if this option is enabled), even if those versions might be older than the number of days specified in the option Delete the versions if they are older than X day(s).

Cleanup job scheduling

If any of these parameters are enabled, a scheduled task will be run every weekday at 2300 to identify if any versions must be deleted for an application. This task will first identify if there are versions to be removed and then launch a cleanup job if required, which will be responsible for removing the versions and and any associated snapshots.

Note that this cleanup job is responsible for cleaning up both snapshots (see the equivalent option for snapshots Administration Center - Settings - Snapshot Strategy) and versions.

Modifying the job schedule

You can modify the timing of the cleanup job using the following .properties file - this file exists on each Node, therefore if you want the job schedule to run at the same time on all Nodes, you will need to make the same change on all Nodes:

%PROGRAMDATA%\CAST\AipConsole\AipNode\aip-node-app.properties

Find the following section:

# Cron configuration to run maintenance tasks on node, like snapshot and version cleanup tasks (defaults to running every weekday evening at 23h00)
# Note that no job will run if settings won't allow it
node.maintenance.cron=0 0 23 * * MON-FRI

Modify any of the six parameters that are listed in this order:

  • seconds (0-59)
  • minutes (0-59)
  • hours (0-23)
  • date of the month (1-31)
  • month (1-12 or JAN-DEC)
  • days of the week (0-6 where Sunday=0 or 7, or SUN, MON, TUE, WED, THU, FRI, SAT, or range of days MON-FRI)

For example to change to running the job at 1am on a Sunday:

# Cron configuration to run maintenance tasks on node, like snapshot and version cleanup tasks (defaults to running every weekday evening at 23h00)
# Note that no job will run if settings won't allow it
node.maintenance.cron=0 0 1 * * SUN

Save the file and restart the Node to ensure the change is taken into account.

Troubleshooting

Versions are not cleaned up even though the cleanup job ran successfully

If you find that versions for some or all of your applications are not being cleaned up despite having checked that the cleanup job is running successfully at the scheduled time, it is likely that there is a desynchronization between CAST Console and the legacy CAST Management Studio that is preventing Console from correctly cleaning up the versions - in other words, actions have been performed using the legacy CAST Management Studio which have created versions which CAST Console is not aware of. To resolve this issue, run a resync action on the affected applications using the Application Management panel in the Admin Center - see Administration Center - Applications and then check after next scheduled job to ensure that the versions have been correctly cleaned up.