Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fix image database inconsistencies

Status
Not open for further replies.

NBMike

Technical User
Apr 1, 2005
25
0
0
GB
Via the bpdbm -consistency report we have identified some inconsistencies in our Netbackup catalogs. Basically we have some images in our image database (ie. images on media report) that shouldn't be there, they should have expired long ago, relating to expired tapes that no longer appear in the media database (ie. media list report) or volume database (ie. media and device manager GUI). We normally use bpexpdate to expire the tapes (and images) but for some reason it doesn't appear to have deleted the image files themselves.

I have a list of all the tapes I need to expire the images on...what bp command would I use to expire/delete all the images from the database properly? I can't use bpexpdate -ev <mediaid>, because the tapes aren't in the media database, when I try bpexpdate complains that the media ID's don't exist and doesn't do anything.

I know I can delete the image files manually through Windows...but there are lots of them, and I want to try and do all this through Netbackup rather than 'via the back door' and don't want to inadvertantly cause even more inconsistencies....

Please can anyone help?

Thank you

M
 
There are two possible options for your particular scenario that I can think of. First it to try the
(vmquery -deassignbyid ) command and then delete the media in the media and device management screen -> media screen. Then when you perform an inventory the media will show as a newly added media. PLEASE NOTE: Veritas does frown on using the vmquery deassignbyid command and they will not suggest using it. But it will give you the ability to scratch your tapes if your absolutely sure you will not need the images in question.

Option 2 would be to look at the bpimage command. I believe there is an option with this command to remove image files from the catalog. Again, as you probably are aware be very meticulous when performing this work or you could lose needed images. I have not used this method so someone else would have to speak to the syntax you would have to use to perform this method.


Question: What version of Netbackup are you running? From you previous post I gather that you are running an older version 3.4 possibly.

 
Thanks for the reply OHWS

Option 1 is very bad surely? If I followed that I would be removing tapes from the volume database but leaving images for them the images database. Netbackup would think the tapes are blank and write to it, creating new images for that tape in the images database, but old ones would still exist too leading to major inconsistencies in the database. I think that's what's contributed to my problem in the first place - I suspect some of our backup admins have incorrectly been using vmquery to deassign tapes from the volume database without making sure the images have expired too in the image database.

Anyhow, in my case as I mentioned in my original post the tapes are already deassigned from the volume database, they don't have a time assigned in the media and device manager list, vmquery -deassignbyid doesn't have anything to deassign, so that won't work. Thanks for the suggestion though.

Option 2 - I'll take a look at the bpimage command, thanks for the tip.

M

 
have you used the command
bpexpdate -m <tapeid> -justimage -force
This should help you out with the images on tape that did not expire then you can do the vmquery deassignbyid
 
$bpimage -cleanup -client (client name)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top