To provide steps on how to use the Archive, Purge, and Restore operations in the Network Configuration Manager (NCM) and what these operations do.
cd /opt/smart-ncm/tools/db-utility/
./database-utility.pl <COMMAND> <TYPE> <ARGUMENTS>
The following are the required arguments for the value, when using the perl database-utility.pl script.
The events type requires two arguments:
The jobs type requires one argument:
The revisions type requires one argument:
If the <COMMAND TYPE> is delete revisions, it needs two arguments:
If the <COMMAND TYPE> is purge ra, no arguments are required.
If the <COMMAND TYPE> is retain latestRAAuditTrail, no arguments are required.
If the <COMMAND TYPE> is purge auditHistory, it needs one argument:
Note: Event Pruning retains last Nx24 hours of events, whereas Job Pruning retains last N days of
jobs.
Examples: The following examples show the usage for the database-utility.pl script
database-utility.pl archive events all 14
database-utility.pl archive jobs 30
database-utility.pl archive revisions 5
database-utility.pl purge jobs 90
database-utility.pl purge events system 30
database-utility.pl prune revisions 10
database-utility.pl purge ra
database-utility.pl delete revisions '2 years' 10 -->This example retains 2 years of revision data and also maintains 10 revisions per device. It deletes all other revisions from the voyence schema.
database-utility.pl delete revisions '30 days' 5
database-utility.pl delete revisions '6 months' 5
database-utility.pl purge auditHistory 30
database-utility.pl retain latestRAAuditTrail