cancel
Showing results for 
Search instead for 
Did you mean: 

Command to fetch data expiration of all tapes in netbackup

SiddhV
Level 3

Hi Folks,

Is there any command which would fetch data expiration date for each tape in netbackup. My master server and media server is installed on Linux.

#/usr/openv/volmgr/bin/vmquery -pn <pool name>

using above command i get the "expiration date" as blank for all the tapes in that pool while all of them are not expired.

Please suggest me how to pull the correct information.

 

Thanks in advance.

8 REPLIES 8

Deepak_G
Level 6
Certified

You can run them through scripts and fetch the data.

Move the tape ID's to a file and then run the script to fetch the data.

 

 

for i in `cat list`

do

echo $i

 

 

/usr/openv/netbackup/bin/admincmd/bpmedialist -m $i | grep -i "time of expiration " >> out.file

 

 

 

 

done

 

Nicolai
Moderator
Moderator
Partner    VIP   

The media expiration date is the data where Netbackup should stop using that tape because is has passed it lifetime. It's not related to the backup images on it.

Andy_Welburn
Level 6

Tape Summary report

bpmedialist -summary

Marianne
Level 6
Partner    VIP    Accredited Certified
The expiration date that you see in vmquery output is a hardware expiration - a date when media is deemed to be too old to be reliable. The default is Never. Data/image expiration is a different concept and is stored in different table. Bpmedialist is a good command. Run the command without any options to get a full list of assigned tapes with their status and expiration date. Also have a look at 'bpmedialist -summary'.

SiddhV
Level 3

Thanks Deepak and rest... I used your solution and it had helped me get tape expiration date.

Now I need command to get the "Last written" date of medias in robot ...

Please advice...

Marianne
Level 6
Partner    VIP    Accredited Certified

Sounds if  'Media Written' report will give what you need.

See this TN for command line equivalent of NBU reports: http://www.symantec.com/docs/TECH20462

You can also use -hoursago instead of -d and -e.

Mark_Solutions
Level 6
Partner Accredited Certified

Do you really need the commands or just the information?

If you just need the information then you can change the column layout and which columns to show under the Media Section and robot section in the administration console

This can then show the data expiration, time assigned, last written or pretty much what ever you want

You can then sort the columns, highlight them all and copy then then drop it straight into excel or the like if you wish

Hope this helps as an alternative option

Deepak_G
Level 6
Certified

If you are expecting a command line option you can use the same script given above and grep for "time last written "

 

/usr/openv/netbackup/bin/admincmd/bpmedialist -m $i | grep -i "time last written" >> out.file