cancel
Showing results for 
Search instead for 
Did you mean: 

NetBackup notify scripts

Rajesh_s1
Level 6
Certified

Hi All,

I am looking to incorporate some script which needs to trigger one batch file at the time of backup begins and once the backup completes "if its a successful backup" then it should trigger an another batch file . 

I gone through the guide but i couldn't able to understand properly .

Please let me know how can i do this 

Regards,

Rajesh

 

 

 

20 REPLIES 20

Rajesh_s1
Level 6
Certified

Hi All,

Finally i am able to achive what i wanted , below is the exact script which solved my problem.

 

@REM --------------------------------------------------------------------
@REM main script starts here
@REM This is a simple script that records what kind of backup was done along
@REM with other relevent information (Client name, policy name, etc) and 
@REM appends the information to the results file
@REM --------------------------------------------------------------------
 
@if %5 == 0 goto DISK
@GOTO :EOF

:DISK
mountvol J:\Mount_points\DBP /d
diskpart /s "C:\HORCM\Backup_Diskpart\diskpart.txt"
@GOTO :EOF

 

" Where inturn the diskpart.txt will call diskpart and offline the disk" . And now if and only if the backup status is "0" it is executing other command else not.

One of the main thing what i noticed is we should not give %5 == "0" , correct syntax is %5 == 0 and in the next line we should give @GOTO :EOF else it was executing rest all commands at all the times.

 

Thanks a lot Mark and Mariane for all your support.

Regards,

Rajesh