cancel
Showing results for 
Search instead for 
Did you mean: 

Scrript for scheduling 3 Netbackup Jobs

dolphin
Level 4

Hi

 

I've create the script as below & schedule it with Windows schedular

 

@echo off
@set PATH=%PATH%;"C:\WINDows\system32"
@set PATH=%PATH%;"C:\Program Files\VERITAS\NetBackup\bin\"
@set PATH=%PATH%;"C:\NAS01\scripts"


cd..
"Program Files\VERITAS\NetBackup\bin\bpbackup.exe" -i -p NAP01-H-R-S-Y-ZDrive -s full -S zmy12app11 -w

cd..
"Program Files\VERITAS\NetBackup\bin\bpbackup.exe" -i -p NAP01-T-W-X-Drive -s full -S zmy12app11 -w

cd..
"Program Files\VERITAS\NetBackup\bin\bpbackup.exe" -i -p NAP01-U-V-Drive -s full -S zmy12app11 -w

 

 

 

When The schedule kick in, it will skip the first policy with errors :"The specified path cannot be found" & start the second policy backup. (NAP01-T-W-X-Drive)

 

Any idea what's went wrong with my scripts?

 

Thanks

 

 

 

7 REPLIES 7

Karthikeyan_Sun
Level 6

Is ur 2nd Policy Backup running successfuly after skiping 1st Policy???

 

also i found one small mistake this may cause of problem !

 

 

cd..

c: 

cd "C:\Program Files\VERITAS\NetBackup\bin\"

bpbackup.exe -i -p NAP01-H-R-S-Y-ZDrive -s full -S zmy12app11 -w

bpbackup.exe -i -p NAP01-T-W-X-Drive -s full -S zmy12app11 -w

bpbackup.exe -i -p NAP01-U-V-Drive -s full -S zmy12app11 -w

 

change your script like above and check because u didnt specify the exact path ! 

dolphin
Level 4

I've modified it & re-run the script. Still getting the same error message

 

Is the batch file got limitation with the characters for my first policy : " NAP01-H-R-S-Y-ZDrive "

 

It just skip the first policy on this script  and straight proceed to backup the second policy without any issues.

 

 

Message Edited by dolphin on 12-15-2008 12:39 AM

Karthikeyan_Sun
Level 6

I dont think so !

 

u have written the same Syntax for 2 nd Policy Backup, But your second policy running without any problem means- there should some incorrect naming in ur script line.

 

If batch file got some limitations then 2 nd policy backup should get the same error ! 

 

re check  again ur storage unit names and others !

 

:) 

 

 

Omar_Villa
Level 6
Employee

if you run this command, just like it is in your script:

 

bpbackup.exe -i -p NAP01-H-R-S-Y-ZDrive -s full -S zmy12app11 -w

 

what happens?

dolphin
Level 4
YES. I've tried to run this line in command prompt & it execute the backup job successfully

Andy_Welburn
Level 6

Have you tried swapping around the sequence that the script runs the backups?

 

e.g. move the first (failing) job to the end so the second job now runs first.

 

Does the same job fail or is it always the first job in the script?

 

***Edit***

 

If the former - then the issue is with that line/policy, if the latter it's some scripting issue.

 

 

Message Edited by Andy Welburn on 12-16-2008 10:20 AM

Omar_Villa
Level 6
Employee

Then the issue is not with netbackup is with the OS, something needs to be configured under windows that will allow you to run the first line I will recomend to search in a windows scritpting forum.

 

regards