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.

Create a .sh file and place in the same directory as the NetWorker save command location, e.g. /usr/bin. Script name e.g. nsr_nbmrcfg.sh

Make sure the appropriate permissions are applied to the file:

  • permissions required - -rwxr-x—. 1 root nsr_nbmr.sh (chmod 750 /usr/sbin/nsr_nbmr.sh)

Edit the .sh file with the following

# export the SHELL that we are going to use
export SHELL

# export the correct PATH so that all the required binaries can be found

    case $0 in
    /* ) PATH=/usr/atria/bin:/bin:/usr/bin:`/bin/dirname $0`
    c=`/bin/basename $0`;;
    * )PATH=/usr/atria/bin:/bin:/usr/bin:/usr/sbin
    export PATH

# These are the valid statuses that save reports upon completion of the backup
completed savetime=
    # Perform the PRECMD
# Perform backup on client#!/bin/sh
exit 0

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.