{"id":2513,"date":"2010-10-19T06:16:53","date_gmt":"2010-10-18T20:16:53","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=2513"},"modified":"2018-12-11T18:30:26","modified_gmt":"2018-12-11T08:30:26","slug":"mminfo-and-not-queries","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/","title":{"rendered":"mminfo and NOT queries"},"content":{"rendered":"<p>A question that&#8217;s just come up on the NetWorker mailing list again (it&#8217;s a periodic one) is, &#8220;how do I query mminfo to return all savesets that don&#8217;t belong to a particular group?&#8221; or &#8220;how do I return all savesets except those belonging to a single client?&#8221;<\/p>\n<p>The part of mminfo here that causes the confusion is the bang operator \u2013 otherwise known as the exclamation mark (!).<\/p>\n<p>In a lot of programming languages, an exclamation mark is typically equated with &#8220;not&#8221;. For instance, if we look at Perl:<\/p>\n<p><strong><em> if ($a != b)<\/em><\/strong><\/p>\n<p>Means &#8220;If the value of $a is not equal to the value of $b&#8221;. It&#8217;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 &#8220;not&#8221;; the trick though is that it&#8217;s not available for all possible usages, just a subset.<\/p>\n<p>In particular, you can only use the exclamation mark within an mminfo query when against a <em>flag<\/em> field. Not a string field, nor a numeric field, etc. Just a flag field. The &#8220;catch&#8221; is that if you use it against a non-flag field, mminfo won&#8217;t abort the query, but will instead ignore the <em>not <\/em>component specified. This means that if you specify, say:<\/p>\n<pre># <strong>mminfo -q \"!client=archon,savetime&gt;=24 hours ago\"<\/strong><\/pre>\n<p>The query actually executed will be:<\/p>\n<pre># <strong>mminfo -q \"client=archon,savetime&gt;=24 hours ago\"<\/strong><\/pre>\n<p>There&#8217;s clearly a big difference between the two, and it&#8217;s brought a few people unstuck.<\/p>\n<p>As it currently stands in NetWorker, if you want to retrieve mminfo details for strings that <em>don&#8217;t<\/em> match particular patterns, your only option is to use an external filter, such as:<\/p>\n<ul>\n<li>A command line utility, such as grep;<\/li>\n<li>Writing the output to a text file and manually extracting;<\/li>\n<li>Writing a custom filter programme;<\/li>\n<li>Writing the output to a CSV file and filtering in a spreadsheet.<\/li>\n<\/ul>\n<p>It would certainly be highly desirable for NetWorker&#8217;s mminfo command to be updated to fully support the not\/&#8217;!&#8217; syntax; until then however keep in mind that it will be ignored for non-flag fields, and you&#8217;ll avoid getting into trouble with it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A question that&#8217;s just come up on the NetWorker mailing list again (it&#8217;s a periodic one) is, &#8220;how do I&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[16,20],"tags":[28,594,643],"class_list":["post-2513","post","type-post","status-publish","format-standard","hentry","category-networker","category-scripting","tag-28","tag-mminfo","tag-not"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"How do you do a &quot;not&quot; query in mminfo for NetWorker? There&#039;s a couple of rules to keep in mind.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Preston de Guise\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Data Protection Hub | All things Data Protection\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"mminfo and NOT queries | Data Protection Hub\" \/>\n\t\t<meta property=\"og:description\" content=\"How do you do a &quot;not&quot; query in mminfo for NetWorker? There&#039;s a couple of rules to keep in mind.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-10-18T20:16:53+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-12-11T08:30:26+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"mminfo and NOT queries | Data Protection Hub\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How do you do a &quot;not&quot; query in mminfo for NetWorker? There&#039;s a couple of rules to keep in mind.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#article\",\"name\":\"mminfo and NOT queries | Data Protection Hub\",\"headline\":\"mminfo and NOT queries\",\"author\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"},\"datePublished\":\"2010-10-19T06:16:53+10:00\",\"dateModified\":\"2018-12-11T18:30:26+10:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#webpage\"},\"articleSection\":\"NetWorker, Scripting, !, mminfo, not\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nsrd.info\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/networker\\\/#listItem\",\"name\":\"NetWorker\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/networker\\\/#listItem\",\"position\":2,\"name\":\"NetWorker\",\"item\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/networker\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#listItem\",\"name\":\"mminfo and NOT queries\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#listItem\",\"position\":3,\"name\":\"mminfo and NOT queries\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/category\\\/networker\\\/#listItem\",\"name\":\"NetWorker\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\",\"name\":\"Preston de Guise\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/\",\"name\":\"Preston de Guise\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Preston de Guise\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#webpage\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/\",\"name\":\"mminfo and NOT queries | Data Protection Hub\",\"description\":\"How do you do a \\\"not\\\" query in mminfo for NetWorker? There's a couple of rules to keep in mind.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/2010\\\/10\\\/19\\\/mminfo-and-not-queries\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/author\\\/nsrd\\\/#author\"},\"datePublished\":\"2010-10-19T06:16:53+10:00\",\"dateModified\":\"2018-12-11T18:30:26+10:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/\",\"name\":\"Data Protection Hub\",\"description\":\"All things Data Protection\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/nsrd.info\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"mminfo and NOT queries | Data Protection Hub","description":"How do you do a \"not\" query in mminfo for NetWorker? There's a couple of rules to keep in mind.","canonical_url":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#article","name":"mminfo and NOT queries | Data Protection Hub","headline":"mminfo and NOT queries","author":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"publisher":{"@id":"https:\/\/nsrd.info\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"},"datePublished":"2010-10-19T06:16:53+10:00","dateModified":"2018-12-11T18:30:26+10:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#webpage"},"isPartOf":{"@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#webpage"},"articleSection":"NetWorker, Scripting, !, mminfo, not"},{"@type":"BreadcrumbList","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog#listItem","position":1,"name":"Home","item":"https:\/\/nsrd.info\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/networker\/#listItem","name":"NetWorker"}},{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/networker\/#listItem","position":2,"name":"NetWorker","item":"https:\/\/nsrd.info\/blog\/category\/networker\/","nextItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#listItem","name":"mminfo and NOT queries"},"previousItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#listItem","position":3,"name":"mminfo and NOT queries","previousItem":{"@type":"ListItem","@id":"https:\/\/nsrd.info\/blog\/category\/networker\/#listItem","name":"NetWorker"}}]},{"@type":"Person","@id":"https:\/\/nsrd.info\/blog\/#person","name":"Preston de Guise","image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"}},{"@type":"Person","@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author","url":"https:\/\/nsrd.info\/blog\/author\/nsrd\/","name":"Preston de Guise","image":{"@type":"ImageObject","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d274b0939f505e2f4b85a111bdf61ff0fafc11f17dcd667d16a47d0a3de63a1d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Preston de Guise"}},{"@type":"WebPage","@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#webpage","url":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/","name":"mminfo and NOT queries | Data Protection Hub","description":"How do you do a \"not\" query in mminfo for NetWorker? There's a couple of rules to keep in mind.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/nsrd.info\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/#breadcrumblist"},"author":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"creator":{"@id":"https:\/\/nsrd.info\/blog\/author\/nsrd\/#author"},"datePublished":"2010-10-19T06:16:53+10:00","dateModified":"2018-12-11T18:30:26+10:00"},{"@type":"WebSite","@id":"https:\/\/nsrd.info\/blog\/#website","url":"https:\/\/nsrd.info\/blog\/","name":"Data Protection Hub","description":"All things Data Protection","inLanguage":"en-US","publisher":{"@id":"https:\/\/nsrd.info\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Data Protection Hub | All things Data Protection","og:type":"article","og:title":"mminfo and NOT queries | Data Protection Hub","og:description":"How do you do a &quot;not&quot; query in mminfo for NetWorker? There's a couple of rules to keep in mind.","og:url":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/","article:published_time":"2010-10-18T20:16:53+00:00","article:modified_time":"2018-12-11T08:30:26+00:00","twitter:card":"summary","twitter:title":"mminfo and NOT queries | Data Protection Hub","twitter:description":"How do you do a &quot;not&quot; query in mminfo for NetWorker? There's a couple of rules to keep in mind."},"aioseo_meta_data":{"post_id":"2513","title":null,"description":"How do you do a &quot;not&quot; query in mminfo for NetWorker? There's a couple of rules to keep in mind.","keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 05:21:43","updated":"2025-07-20 04:49:03","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/nsrd.info\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/nsrd.info\/blog\/category\/networker\/\" title=\"NetWorker\">NetWorker<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tmminfo and NOT queries\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/nsrd.info\/blog"},{"label":"NetWorker","link":"https:\/\/nsrd.info\/blog\/category\/networker\/"},{"label":"mminfo and NOT queries","link":"https:\/\/nsrd.info\/blog\/2010\/10\/19\/mminfo-and-not-queries\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-Ex","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=2513"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2513\/revisions"}],"predecessor-version":[{"id":7541,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2513\/revisions\/7541"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=2513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=2513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=2513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}