cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup Tape written report

Hello All,

We require a list of tapes that have been written to in the last 24 hours alonwith the retention period.

I see that the command mentioned below gives me this output, but without the retention period.

 

\Program Files\Veritas\NetBackup\bin\admincmd>bpimagelist -A -media -hoursago 24

Is there a command that will give me this output with the retention perion like the one from the GUI from netbackup (Tape reports --> Tape written)

Attached is the screenshot from same highlighting what I require in the command line output.

Any help will be much appreciated.

Many Thanks!

Jay

6 Replies

Re: Netbackup Tape written report

You can use bpimagelist with the -l switch and take fields #13 and #16 from it for retention period and expiration date, respectively. For the full list see https://www.veritas.com/support/en_US/article.TECH5584

Re: Netbackup Tape written report

Hello Mouse,

Thanks for the solution.

I should have mentioned this earlier, but I need to offsite tapes and also capture an audit trail while doing so.

Hence I am looking to email this output to us which will be in a format where we can tell the auditers which tapes were sent offsite and why.Once I get the command working in the desired format, emailing them should be fine as I have got that working already.

This is the reason why I am looking for the retention period to be specified in the email that will be automatically sent on a daily basis.

I see some promise with this command

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpimagelist -L -media -hoursago 24
Media ID:          XXXX
Server:            XXXX
Last Time Written:      03/01/2019 02:55:39 (1546484139)
Times Written:     254 (within this time period)
Kilobytes:         962092275 (within this time period)
Retention Level:   1
Media on Hold:     0

Media ID:          XXXX
Server:            XXXX
Last Time Written:      02/01/2019 09:33:19 (1546421599)
Times Written:     36 (within this time period)
Kilobytes:         29715027 (within this time period)
Retention Level:   1
Media on Hold:     0

Media ID:          XXXX
Server:            XXXX
Last Time Written:      03/01/2019 06:01:45 (1546495305)
Times Written:     3 (within this time period)
Kilobytes:         1115898 (within this time period)
Retention Level:   4
Media on Hold:     0

Media ID:          XXXX
Server:            XXXX
Last Time Written:      02/01/2019 20:03:58 (1546459438)
Times Written:     11 (within this time period)
Kilobytes:         102629902 (within this time period)
Retention Level:   4
Media on Hold:     0

 

Is it possible to parse this output to only get retention levels above 1 ?

 

I ran the command with the -rl switch to get output for retention level 1, but when I run the same command with retention level 4 it does not give any output. Even though there are media with retention level 4 see outputs above and below

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpimagelist -L -media -hoursago 24 -rl 1
Media ID:          XXXX
Server:            XXXX
Last Time Written:      03/01/2019 05:07:53 (1546492073)
Times Written:     179 (within this time period)
Kilobytes:         528225051 (within this time period)
Retention Level:   1
Media on Hold:     0

Media ID:          XXXX
Server:            XXXX
Last Time Written:      02/01/2019 21:29:51 (1546464591)
Times Written:     14 (within this time period)
Kilobytes:         115353668 (within this time period)
Retention Level:   1
Media on Hold:     0

D:\Program Files\Veritas\NetBackup\bin\admincmd>bpimagelist -L -media -hoursago 24 -rl 4
no entity was found

D:\Program Files\Veritas\NetBackup\bin\admincmd>

 

Could you please help.

Many Thanks,

Jay

 

Re: Netbackup Tape written report

Hey Jay,

Are you using NetBackup Vault by the chance (and if not, then why) - it's got built-in reports for this purpose, see https://www.veritas.com/content/support/en_US/doc/15883112-127663909-0/id-SF710283467-127663909

Re: Netbackup Tape written report

Hi Mouse,

I had looked at netbackup Vault , but It is a paid product that has to be purchased separately, correct?

Due to the small volume of tapes, our management is not redy to buy it and hence my connundrum :(

The -rl switch in the command is not returning any tapes for retentions higher than 1 ( even though there are tapes with higher retentions). Could you please suggest.

Thanks,

Jay

Re: Netbackup Tape written report

Ah, you might be using the traditional licensing method then, as it's bundled with capacity licensing. Besides the reporting benefit, the Vault option is also useful to track tapes that should be returned back to the library/re-used once expired offsite.

When looking into -rl, did you check the retention levels in bpretlevel to make sure you're running a query against a correct retention level? The information you need can be easily filtered out in unix/linux by piping bpimagelist -l to awk to filter by the required fields, I'm sure there is a way to do it in Windows but I am not good with its scripting tools :(.

Re: Netbackup Tape written report

And one more question - are you checking the retention level of copies or original volumes? I have a feeling that -rl is only working for the primary copy, all secondary copies should be grepped from FRAG N, where N is the copy number