Views

Is there a way to check the consistency of the database?

This Wiki is brought to you by Backup Central, where you can find the Mr. Backup Blog, Forums, and a mailing list for each forum!

Backup FAQs Service Providers Backup Software Backup Hardware Backup Book Wiki Free Stuff Miscellaneous


Yes. Just run the command: bpdbm -consistency

You might want to pipe the output to a file as it can be quite large and quickly scrolls off the page. It also can take quite a while to run. For example, it took a 2 processor Sun450 with a 14GB database about 45 minutes to execute.


This command does not actually fix the inconsistency.


At least two strings that can be searched for to find problems:

"Bad image header"

"does not exist"


I've also found it useful to filter out lines containing the strings "checking image file" and "checking files file". What's left will be a list of machines followed by errors.


Generally your only recourse to correct the problem is to delete the offending images. Delete the image header, the image '.f' file, and the image indexes. The indexes for the image are located in /usr/openv/netbackup/db/images/client-name/INDEX and will have the same file name as the header file plus suffixes that match '.i?'. Gerald Patterson pointed out an error in the above text that has been corrected. Thanks, Gerald!


It is also possible to request that the running bpdbm do something similar with the command:

/usr/openv/netbackup/bin/admincmd/bpimage -cleanup -allclients

This will produce output in that day's bpdbm log file. The output is much less verbose and clearly doesn't check as many things, but it does pickup the "Bad image header" errors. This is simply kicking off manually the same cleanup that bpsched initiates after being idle for (by default) 10 minutes (and which will force all later enqueued backup jobs to wait until it has completed absent a CLEAN_IN_BACKGROUND file in place). This is discussed in Veritas's technote 236274, and may no longer be valid under NetBackup 6.x (I don't have a test system handy).

Also, note that one should take the "Bad image" assertion with a grain of salt and check the seconds-since-epoch date in the name. If a backup is running but hasn't finished creating a TOC for the archive it's about to make, then the image header file will be zero size and the file listing (same name, .f extension) won't exist yet.

--Grammar 09:55, 15 October 2007 (PDT)