Hello. I want to run a snapshot script before a backup starts that I have verified works properly without any stdout. My issue is that the script is re-snapping a volume on a remote server and the backup job will attempt to start before said script is finished. I have even written in some old school batch 'waiting' in the bpstart_notify.bat to try to wait for it to complete. Is there a way to make NetBackup wait for the scripts to finish before moving on? Here is the code:
bpstart_notify.bat:
@REM main script starts here
@REM This is a simple script that records what kind of backup will be done along
@REM with other relevent information (Client name, policy name, etc) and
@REM appends the information to the results file
@REM --------------------------------------------------------------------
@REM print a generic message since backup is neither full, nor cumulative incremental
@REM @echo backup/restore started on %1 using policy %2 with schedule %3 and status %5, bpres = %6 >> bin\BP_RES.txt
@REM @echo 0 >> %6
@call c:\scripts\snapDCC.bat >> %6
:loop
@if exist c:\scripts\dccSnap.done goto end
@ping 127.0.0.1 -n 5 -w 1000 > nul
@goto loop
:end
@del c:\scripts\dccSnap.done
The snap script looks like this (snapping with Sun's CAM software):
@call C:\scripts\Component\sscs\bin\sscs.bat login -h xxx -u xxx
@echo login done >> c:\scripts\dcc.log
@call C:\scripts\Component\sscs\bin\sscs.bat modify -a xxx_array -R snapshot snap_xxx
@echo RD1 Mapped >> c:\scripts\dcc.log
@call C:\scripts\Component\sscs\bin\sscs.bat logout
@echo logged out >> c:\scripts\dcc.log
@ping -n 30 -w 1000 0.0.0.1 > NUL
@echo DONE >> c:\scripts\dccSnap.done
As I said, the scripts work perfectly, it is a timing issue of the actual backup of the data sometimes starts before the snap is complete.