Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.

Netbackup Report Writer

Created: 10 Dec 2010 | 10 comments
Satkay Satish's picture
+1 1 Vote
Login to vote

Hi NBU Folks,

In this download I'm sharing the VB utility that i coded to generate Netbackup reports.

Features.

  • Can be automated to run daily.
  • Either run it on master or media server, But it needs to be Windows as its a VB utility.
  • Can be used to trace each policy run.
  • Retention levels can be defined through configuration file.
  • Ideal for setups which are small and cannot afford to have reporting softwares. Its light and reports most of the job details.
  • With added script, report can be mailed. ( Shared along with tool )

Enhancements Pending

  • Need to add column to display the media's used for a job.
  • Needs to be integrated with backend DB to generate historical data.
  • More enhancements welcome. smiley

How it Works

  • The utility requires the output of bpdbjobs -all_columns
  • The o/p from above command is processed and required fields are extracted
  • The configuration file policy_list.txt is checked for policies to generate report
  • report_writer_config.txt is checked for retention levels to be displayed in report. ( This is done because every site has different retentions configured for different levels, Change the fields as per your site setup)
  • Report is generated and named as report_dd_mm_yy.html

 

Installation

  • Create a folder C:\Report Writer    <-- This is required, I've hard coded in binary. wink will be removed later
  • Copy all the files in the attached zip folder to C:\Report Writer
  • Put all the policies that you wish to monitor for backups in policy_list.txt file.
  • Update the retention level for your site in report_writer_config.txt file
  • Rename Register_DLL.txt to Register_DLL.bat and run the file to register the DLL files.
  • Rename Report_Writer_NTUC_12_Nov.txt  to Report_Writer_NTUC_12_Nov.exe
  • Get the output of bpdbjobs -all_columns > bpdbjobs.txt, Copy this file bpdbjobs.txt to C:\Report Writer ( Please note it won't work without this file, even if file exists it reads the file for NBU format)
  • Run Report_Writer_NTUC_12_Nov.exe
  • If its to be run on x64 systems, download & Copy COMDL32.ocx in WOW/SYStem32

The tool should run and you should be able to generate the report manually.

Automated Run ( Scripts shared in download )

  • Once the tool is installed, the below batch script can be scheduled for generating automated reports.
  • -q parameter generates the report for last 24 hrs.

========= NBU-Report.bat==============

cd C:\Report Writer
del bpdbjobs.old
ren bpdbjobs.txt  bpdbjobs.old
bpdbjobs -all_columns > bpdbjobs.txt
Report_Writer_NTUC.exe -q
Send_Mail.vbs

 ==================================

  • In Send_Mail.vbs, provide the SMTP server IP, recepients name for the report. 

 

Hope it helps our NBU folks. Comments & Enhancement requests are most welcome.

 

Thanks!

Satkay Satish

Download Filed Under:

Comments 10 CommentsJump to latest comment

Filip Hasa's picture

Hi, 

 i think it is a litle bit complicate to configure. How about to use config file for smtp server?

For retension file check command: bpretlevel.exe  -l 
You can automatic generate report_writer_config.txt wink

Why don't you include COMDL32.ocx to zip file?

How about failed jobs? Can be add to report as option.

Please check my tool NBU Configuration Reporter

Thank you

My improvments:

========= NBU-Report.bat==============
setlocal
set PATH=%PATH%;C:\Program Files\Veritas\NetBackup\bin\admincmd
pushd C:\Report Writer
del bpdbjobs.old

ren bpdbjobs.txt  bpdbjobs.old
bppllist  > policy_list.txt
bpdbjobs -all_columns > bpdbjobs.txt
Report_Writer_NTUC_12_Nov.exe -q
Send_Mail.vbs
popd
endlocal
 ==================================

 

========= Register_DLL.bat==============
regsvr32.exe /s ccrpUCW6.dll
regsvr32.exe /s ccrpDtp6.ocx
regsvr32.exe /s COMDLG32.OCX
 ==================================
 
-3
Login to vote
JSzeto's picture

I am trying to trigger this tool and getting the result of the past week or 2.

I tried report_writer_NTUC.exe -q 72 and the GUI popped up..

 

Also can I specify where the html will be saved and in a constant name .html too ? (eg. c:\website\report_writer_result.html)

-3
Login to vote
Satkay Satish's picture

Hi Jacky,

I've coded -q to run only in quite mode. If any other option or no option is specified it would open the GUI which gives option to select start and end dates.
 
If you need to run report for 72 hours you need to use GUI which cannot be automated
 
I've attached new verison of this file which generates the report and names it as DD_MM_YY. ( Rename the file from .txt to .exe)
 
Try this out. It has more fields.
 
Also i've changed the color and looks. Will mail you by tomorrow that version

Also note, Now you need to run bpdbjobs -most_columns instead of bpdbjobs -all_columns.

bpdbjobs -most_columns > bpdbjobs.txt

this generates the report much quicker.

 

Thanks!

Satish

AttachmentSize
HTML_Reporter_01_Oct_2011.txt 32 KB

-1
Login to vote
JSzeto's picture

Run Time error 53, what am I missing?

-3
Login to vote
Satkay Satish's picture

Hi Jacky,

Sorry forgot to tell you that you need to create jobid.txt in the same location as the tool and then open this file and key in the job id from where you need to generate the report. this is one time and after every run it would update itself with the last jobid processed.

Like to know if it worked.

Thanks!

Satish

-1
Login to vote
Satkay Satish's picture

here's the updated code.

AttachmentSize
HTML_Reporter_16_Oct_2011.zip 289.45 KB

-3
Login to vote
JSzeto's picture

Works now, thanks Satish.

-3
Login to vote
Satkay Satish's picture

Happy coding and Do share with any enhancements for us all to utilize. :)cool

-1
Login to vote
LiamJG's picture

Hi Satkay,

Could you please help me, I've installed everything as outlined above but when the report is generated and emailed it lists the policies as "Not Found", the format etc of the policies is exactly what is in the "bpdpjobs.txt" but it doesn't convert to the report which is emailed.

Hope you can help.

Cheers

 

Liam 

(Please see the attachments)

AttachmentSize
Netbackup Report.pdf 11.74 KB
policy_list.txt 145 bytes
bpdbjobs.txt 1.05 MB
-3
Login to vote
Satkay Satish's picture

Hi LiamJG,

Apologies for late response. Please set the date format in Control Panel --> Regional setting --> Customize

to M/d/yyyy.  I faced similar issue and it was fixed as outlined above.

 

Thanks!

Satkay

-3
Login to vote