[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2827
  • Last Modified:

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?
  • 3
  • 2
1 Solution

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.

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

andyalderSaggar makers bottom knockerCommented:
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.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now