Manually pruning NetWorker indexes

Under Legato NetWorker, the nsrim(1m) utility controls and prunes the client file indices. nsrim be default is executed by nsrd after a savegrp completes it's cycle.

When managing a large client environment within NetWorker finding that nsrim automatically starting can impact performance of ongoing backup schedules. nsrim is very CPU and disk intensive utility, and the last thing required while running tight backup schedules is to have your backup server eating away at potential CPU and disk resources..

SBU has a method of allowing a backup administrator to turn off the automatic scheduling of the nsrim process by simply creating an empty file in the /nsr/mm directory called nsrim.prv.

However, to utilise this method of manual index maintenance the nsrim.prv file needs to be accessed at least once in every 24 hour period. Performing this task under Solaris requires that the administrator executes the following command:

# touch /nsr/mm/nsrim.prv

The touch command updates the timestamp on a given file. Executing the touch command without any options causes the files last modified date/time to be replace with the current system date and time.

If adopting the above method to disable automatic pruning of client indexes, one must adopt an alternative method of running nsrim. General consensus is via a script execute via cron. A typical script would execute:

  • List individually the /nsr/index directory in order to obtain a list of valid client indexes.
  • Issue 'nsrim -X -c client-name' against each entry.
  • Issue the 'nsrck -F client-name' to optionally compress the client index.
  • Update the modification timestamp on the /nsr/mm/nsrim.prv by using the touch command.

A varient to the above would be to simply execute the following three commands:

# nsrim -X
# nsrck -F
# touch /nsr/mm/nsrim.prv

NOTE: When a client-name is not specified for either the nsrim and nsrck commands, all client indices are processed.