Creating and Running NDMP Backup Jobs by Using the BEX Command

The following is the syntax of the BEX command, which is run from the command line:

BEX –s <masterservername> –u <username> –p <password> [-i <initfile>] <COMMAND>

where

<COMMAND> = "-c "<command string>" –f <command file>"

and where

<command string> = "backup define –n <jobname> -t <jobtype> ^
  -f <definitionfile> -run [-replace]"

<COMMAND> consist of parameters to build out the job definition and run it, and <command string> defines the actions.

The following example command string defines an NDMP backup job named nTESTBEXINT:

"backup define –n nTESTBEXINT –t backup_ads –f cmdfile.txt –run -replace"

<definition file> specifies the file that defines the backup. In this case, the file is called cmdfile.txt. It contains the backup command and parameters that define the backup source and destination. Ensure you define the destination media pool and device or cluster beforehand within the management console so that they are valid entries in cmdfile.txt.

The following illustrates the syntax of the backup command. The data section specifies the source node and node type, the selection section specifies what is included in the backup, and the backup destination section specifies the media pool and destination device or cluster:

The following example definition file, cmdfile.txt, protects the contents of a Snapshot named hourly.0 under /vol/TEMP located on a NetApp storage system named netappsim. The command backs up the Snapshot to a destination media pool NULLMP and a device cluster NULLDC:

<cmdfile.txt>
BACKUP

  NODE (netappsim NDMP)
  SELECT (I "/vol/<vol_name>/.snapshot/hourly.0/*")
    MEDIAPOOL NULLMP
    DEVICECLUSTER NULLDC
  ;

The following example illustrates the full BEX command:

BEX –s masterserver –u sysadmin –p sysadmin –c "backup define –n nTESTBEXINT ^
  –t backup_ads –f cmdfile.txt –run –replace"

This command creates and runs an NDMP backup job called nTESTBEXINT based on the job definition found in cmdfile.txt. If a job of the name nTESTBEXINT exists, the command replaces the existing job definition.

Last updated