How do you script BPVERIFY command in NetBackup?

I'm looking for a way to script the bpverify command in NetBackup Datacenter 4.5GA.  I need to make it run once the backup is complete, and I need to be able to specify which servers to verify.

Can anybody help me out with this?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


bpverify - Verify the backups created by NetBackup.

install_path\NetBackup\bin\admincmd\bpverify [-l] [-p] [-pb] [-v]
[-local] [-client name] [-st sched_type] [-sl sched_label]
[-L output_file [-en]] [-policy name] [-s date] [-e date]
[-M master_server] [-Bidfile file_name] [-backup_copy
backup_copy_value] [-pt policy_type] [-hoursago hours] [[-cn
copy number] | [-primary]][-backupid backup_id] [-id
media_id | path]

bpverify verifies the contents of one or more backups by reading the backup volume
and comparing its contents to the NetBackup catalog. This operation does not compare
the data on the volume with the contents of the client disk. However, it does read each
block in the image, thus verifying that the volume is readable. NetBackup verifies only
one backup at a time and tries to minimize media mounts and positioning time.
If either -Bidfile or -backupid is specified, bpverify uses this option as the sole
criterion for selecting the set of backups it will verify. If the command line does not
contain -Bidfile or -backupid, then bpverify selects the backups that satisfy all the
selection options. For instance, if the command line looks like
bpverify -pt Standard -hoursago 10
then bpverify verifies the set of backups with policy type Standard that have been run
in the past 10 hours.
If -p or -pb is specified, bpverify previews the set of backups that meet the selection
criteria. In this case, bpverify displays the backup IDs, but does not perform the

Good luck

AltezzaRokuAuthor Commented:
Thanks cyber.. I've seen that in the admin guide... the hard part is getting it to kick off right after the backup is complete.  It looks like I have to schedule it to run bpverify at a certain time instead of based on the activity monitor.  Anyone know how to automatically start it right after the backup completes?  thx.
In my opinion, just, 'call' the batch file right after backup is completed. This wil cause the script to use the batch file right after the backup operation is completed. I think it is a suitable solution.

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

AltezzaRokuAuthor Commented:
How can I call the batch to start after a completed backup?  I'm not too sure what to call it with (task scheduler?) and how the program that calls it would know the backup finished.  
You can use NTBackup via command line scenario thus allowing you to actually backup using any media you choose, including tape libraries, along with any destination to backup using log files. When you use a batch file to backup data, you have the ability to manuver in a more accurate manner your tasks and backup features.

I assembled a few useful links that will allow you to understand even better the whole process.

Windows 2000 NTBackup command line switches.

How do I perform an NTBackup in Windows 2000, without having to manually manage the media?

More on Windows 2000 backup command-line switches.

Than, when finished writing the backup script, you an use 'call' command to 'call' an external procedure; for that matter, the 'bpverify' command. One more thing though, dont forget to generate reports of all backup operations you make. This will allow you to track down true backup status.

Hope I helped in some way

Good luck

Assuming the backup policy you want to run the post-execution command is called mybackup then grab the bpend_notify script from the goodies folder and copy it to ..\netbackup\bin and rename it as bpend_notify.mybackup (or bpend_notify.mybackup.cmd if windows) then edit it chopping out the whole text and replace it with your bpverify command. The filename format is bpend_notify.policy.schedule(.bat) if you omit schedule then it runs for all schedules using that policy, if you omit both schedule and policy then it runs for every backup that is run.

Note that bpverify does not verify the data written to tape against the data that is on the server, it verifies the tape contents with the catalog contents so if a file is a different size on tape than the catalog thinks it is then it will exit with error but if the file is the correct size but contains completely different data than is on the server it will not error. Can't see much use in running bpverify immediatly after the job myself, even if it was to verify against the server (which it doesn't) the data would probably be different on the server by the time it came round to verify it.

Only way I can see of verifying the tape against the actual server data would be to have a bprestore in the bpend_notify script and get that to restore to a parallel directory on the client and then kicck off a file compare on the client using normal shellscript or BAT commands.

Cyber, have you ever seen Backup Pro or NetBackup? you seem to be talking about NTbackup.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.