How do you script BPVERIFY command in NetBackup?

Posted on 2004-11-19
Last Modified: 2008-01-09
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?
Question by:AltezzaRoku
    LVL 15

    Expert Comment


    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


    Author Comment

    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.
    LVL 15

    Expert Comment

    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.


    Author Comment

    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.  
    LVL 15

    Expert Comment

    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

    LVL 55

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Sometimes the best way to deal with an infected computer is to boot from external media and run your tools from there.  The reason you may wish to do this really depends on the infection.  Some malware is so recalcitrant that no matter what you do i…
    I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
    This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now