Archiving and deleting versioned configurations from the database (ConfigArchive)

To archive and/or delete versioned configurations from the database, specify the ConfigArchive keyword when executing the icosutil utility. This keyword executes the ConfigArchive utility with the options specified on the command line. One of these options is a properties file that allows you to specify which versioned configurations to delete from the database.

Syntax

./icosutil ConfigArchive -f /opt/IBM/tivoli/netcool/ncm/config/properties/configArchivingUtility.properties

Description

The ConfigArchive utility archives and/or deletes versioned configurations from the database based on criteria specified in the configArchivingUtility.properties file. By default, the configArchivingUtility.properties file resides in the /opt/IBM/tivoli/netcool/ncm/config/properties directory.

The ConfigArchive utility is used to manage filtered versions of configurations, and does not work with configurations which are current, draft or marked as 'golden'.

The ConfigArchive utility can retain or delete versioned configurations based on the following criteria:

  • SelectedConfigurationAction
  • lastNEntries
  • endDateFromCurrentDateUnits
  • endDateFromCurrentDateUnitsOfTime

If archiving is enabled, one gzipped xml archive file is created for each versioned configuration that is archived. The ConfigArchive utility uses the following naming scheme:
CONFIG_<internal_config_version_id>_<TIMESTAMP>.xml.gz

Where: TIMESTAMP specifies the date and time in which the ConfigArchive utility created the Archive file.

Parameters

ConfigArchive
Specifies the keyword that instructs the icosutil utility to execute the ConfigArchive utility. The ConfigArchive utility proceeds to delete versioned configurations from the database based on criteria specified in the configArchivingUtility.properties file.
-f
Specifies an option when using the ConfigArchive keyword.
configArchivingUtility.properties
Specifies the configArchivingUtility.properties file that defines the criteria that the ConfigArchive utility uses to delete versioned configurations from the database.

Notes

Note: Golden configurations cannot not be archived.

As increasing numbers of network resources and configurations per resource are added to Netcool Configuration Manager - Base, housekeeping duties become particularly important to free up storage space and maximize run time performance. The following utilities perform these housekeeping duties:

ConfigArchive
Archives and deletes versioned configurations from the database.
WorkHousekeeping
Deletes completed UOWs from the database.
For more information, see Deleting completed UOWs from the database (WorkHousekeeping).
Archive
Archives the UOW.
For more information, see Archiving a UOW (Archive).
Note: In order to perform Housekeeping duties using the previously listed utilities, the user must belong to a group with the Housekeeping activity.

To delete a versioned configuration, the user must also have delete rights for the contents of the realm containing the configuration.

Using the ConfigArchive utility

The ConfigArchive utility can be run concurrently with other units of work. Other UOW types will not encounter work conflict warnings, or device already locked errors.

Follow these steps to delete versioned configurations from the database:

  1. Edit the sample configArchivingUtility.properties file distributed with the Netcool Configuration Manager - Base software. This sample properties file demonstrates how the ConfigArchive utility works, and comes complete with examples. The configurationHousekeepingUtility.properties file can be configured to run with your system.
  2. Run the ConfigArchive utility using the following command:
    ./icosutil ConfigArchive -f /opt/IBM/tivoli/netcool/ncm/config/properties/
    configArchivingUtility.properties [-Xms] [-Xmx]
    Where:
    Xms
    Sets the minimum size of the memory allocation pool (minimum heap size). Set this value to a multiple of 1024 that is greater than 1 MB. As a general rule, set minimum heap size (-Xms) equal to the maximum heap size (-Xmx).
    Xmx
    Sets the maximum Java heap size. Set this value to a multiple of 1024 that is greater than 1 MB.
  3. Depending on whether the utility is being run with the Report-Only flag set to true or false, the utility will generate a total of the configurations to be deleted, or it actually removes the selected configurations. Either way, the report is generated.
  4. 5. The archiveConfigFlag in configArchivingUtility.properties controls whether versioned configurations will be archived prior to deletion. The default value (true) delivered with the configArchivingUtility.properties file will mean Archive files will be created.
  5. Review the report produced to verify that all expected configurations were archived or deleted.

Results

A ReportOnly option is available in the configArchivingUtility.properties file. If running with the ReportOnly option set to False, all versioned configurations that meet the selection criteria will be deleted completely from the database, Queue Manager, Resources tab, and the Reports tab.

If a configuration selected for deletion cannot be deleted due to insufficient security rights, the utility will cease to run. The utility can only work if the user has housekeeping privileges.

If running with the ReportOnly option set to True, a report will be generated that shows the number of configurations that will be deleted.

This flag specifies whether or not the utility is being executed in ReportOnly mode. If the value is true, the configuration housekeeping utility report will show how many configurations would have been deleted based upon the criteria, but the configs will not actually be deleted (this is useful for testing new criteria settings). If the value is false, the report is generated and the configs are permanently deleted from Netcool Configuration Manager - Base. The ReportOnly default value is true.

By default the ‘archive root’ directory that archive files will be written to is the $INSTALL_DIR/configurationArchive directory, but this can be overridden by specifying the full path to another directory (to use as the ‘archive root’ directory) in the ‘archiveDirectory’ property of the configArchivingUtility.properties file. Under the ‘archive root’ directory archive files will be written to a subdirectory corresponding to a devices realm or subrealm.

In addition to the versioned configuration information the archive file will also contain some resource level information (‘RESOURCEBROWSER’ section in the xml archive file), this is to allow users to more easily associate the archived configuration information with the relevant resource.