NBMR EMC Networker Pre-Schedule Command - Linux

The purpose of the pre-schedule command is to run the NBMR configuration program on the source machine automatically when the EMC NetWorker scheduled backup has triggered, this makes sure the config file used in the backup is up to date.

This works by adding a script to the source machine and modifying the Client Properties in the EMC NetWorker administrator console to point to the script.

Once this is completed EMC NetWorker will run the script on the client that triggers nbmrcfg, then the EMC Networker backup starts.

There are certain conditions that should be meet:

  • The script name must begin with either the prefix ‘save’ or ‘nsr’ and must not exceed 64 characters.
  • The script must reside on the client in the same directory as the EMC NetWorker save command.
  • The EMC NetWorker save command must be used in the backup program.
  • All commands within the program file must complete successfully. Otherwise, the EMC NetWorker server cannot complete the remaining instructions e.g. the actual backup.

NBMR / EMC Networker Linux pre-script

==================================================

This simple script is required to call the nbmrcfg script in /usr/bin. The script is then set in the Networker Server Client so Networker can run it automatically when

backup is initiated. This will capture the current state of the machine and save it to /NBMRCFG/nbmrcfg.log

Creating the script

============

  • Create a bash script called nsr_nbmr.sh (NOTE: the script has to be prefixed with ‘nsr’ for Networker to recognise it)
  • Edit the file and add the following script (simply calling nbmrcfg) then save it:

NOTE that you need to declare and export the path because the Networker client isn’t root so it needs to know the path

#!/bin/bash
export PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin 
nbmrcfg
exit
  • Move the script to /usr/bin:
  • Add executable permissions for all users to the script (755):

Add the name of the script to the ‘Apps & Modules’ tab of the client properties in EMC NetWorker Administrator Console in the ‘Pre command’ field.