A question that’s just come up on the NetWorker mailing list again (it’s a periodic one) is, “how do I query mminfo to return all savesets that don’t belong to a particular group?” or “how do I return all savesets except those belonging to a single client?”
The part of mminfo here that causes the confusion is the bang operator – otherwise known as the exclamation mark (!).
In a lot of programming languages, an exclamation mark is typically equated with “not”. For instance, if we look at Perl:
if ($a != b)
Means “If the value of $a is not equal to the value of $b”. It’s a similar story in other languages that make use of the exclamation mark. Indeed, making it perhaps a little more confusion to the uninitiated is that in mminfo, ! does indeed mean “not”; the trick though is that it’s not available for all possible usages, just a subset.
In particular, you can only use the exclamation mark within an mminfo query when against a flag field. Not a string field, nor a numeric field, etc. Just a flag field. The “catch” is that if you use it against a non-flag field, mminfo won’t abort the query, but will instead ignore the not component specified. This means that if you specify, say:
# mminfo -q "!client=archon,savetime>=24 hours ago"
The query actually executed will be:
# mminfo -q "client=archon,savetime>=24 hours ago"
There’s clearly a big difference between the two, and it’s brought a few people unstuck.
As it currently stands in NetWorker, if you want to retrieve mminfo details for strings that don’t match particular patterns, your only option is to use an external filter, such as:
- A command line utility, such as grep;
- Writing the output to a text file and manually extracting;
- Writing a custom filter programme;
- Writing the output to a CSV file and filtering in a spreadsheet.
It would certainly be highly desirable for NetWorker’s mminfo command to be updated to fully support the not/’!’ syntax; until then however keep in mind that it will be ignored for non-flag fields, and you’ll avoid getting into trouble with it.
what’s your meaning of “flag field”?
Refer to the man page for “mminfo” and look for the ‘flag’ entry in the “value range” column. E.g., “full”, “inuse”, “volrecycle”, “readonly”, “manual”, etc.
Hello,
Can mminfo queries be used in Avamar? Specifically to pull a listing of backup failures over a 6 month period.
No, mminfo is a NetWorker tool. Avamar is an entirely different product. You may want to refer to the Avamar reporting guide. I’m not as familiar with Avamar low-level reporting, but it could be there’s some options in mccli to report some details of what you’re after. From a future perspective, you may wish to consider using DPA with your Avamar environment, as this would be a very straight-forward DPA report.