Building the Definition File

If parameters of the job definition (such as Snapshot name, file name, volume name) change between each run of the backup job, create another script, which can build out the job definition file for you by using command line parameters in batch scripting. The following is an example of such a script:

<builddefinitionfile.bat>

@ECHO OFF
set FILERNAME=%1
set VOLUMENAME=%2
set SNAPSHOTNAME=%3
echo BACKUP
echo      NODE (%FILERNAME% NDMP)
echo      SELECT (I "/vol/%VOLUMENAME%/.snapshot/%SNAPSHOTNAME%/*")
echo      MEDIAPOOL NULLMP
echo      DEVICECLUSTER NULLDC
echo ;

Based on the example backup job, this script builds the following:

C:\builddefinitionfile.bat netappsim testvol hourly.0

BACKUP

  NODE (netappsim NDMP)
  SELECT (I "/vol/testvol/.snapshot/hourly.0/*")
  MEDIAPOOL NULLMP
  DEVICECLUSTER NULLDC

;

Related Topics:

Last updated