{"id":52,"date":"2009-02-03T17:11:17","date_gmt":"2009-02-03T06:11:17","guid":{"rendered":"http:\/\/nsrd.wordpress.com\/?p=52"},"modified":"2018-12-12T16:36:50","modified_gmt":"2018-12-12T06:36:50","slug":"basics-matching-savesets-with-files-on-disk-backup-units","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2009\/02\/03\/basics-matching-savesets-with-files-on-disk-backup-units\/","title":{"rendered":"Basics &#8211; Matching savesets with files on disk backup units"},"content":{"rendered":"<p>Generally speaking, you don&#8217;t want to be mucking around with the contents of your disk backup units except under extreme circumstances. In fact, I really recommend that you <em>don&#8217;t<\/em> do so unless you 100% know what you&#8217;re doing.<\/p>\n<p>So this post is all about that 1-5% of the time where you may find it necessary to say, search for a saveset that&#8217;s reported in the media database that you&#8217;re having problems accessing from the disk backup unit.<\/p>\n<p>It&#8217;s actually trivially easy, once you know how.<\/p>\n<p>You may be familiar with the following style of query:<\/p>\n<pre># mminfo -q \"savetime&gt;=24 hours ago\" -r \"volume,client,level,sumsize,savetime(22)\"<\/pre>\n<p>The (22) at the end of the savetime report parameter tells mminfo to allow 22 characters for the reporting of the savetime. The benefit of this is that you get not only the savetime <em>date<\/em>, but also the <em>time<\/em> as well.<\/p>\n<p>NetWorker actually allows you to put that (number) postfix onto <em>any<\/em> field that it can output in mminfo. This can output additional information, such as the above, or give more room to output longer fields, or even limit the size of fieldnames when you don&#8217;t need too much information. (E.g., if the first 4 characters of all client names can uniquely identify the client, you might limit the client to 4 characters in an mminfo report.)<\/p>\n<p>Now, where we&#8217;re heading with this, is that the sorts of filenames used for the savesets written to disk backup units are <em>not<\/em> some random collection of strings &#8211; they&#8217;re actually the <em>long saveset ID<\/em>.<\/p>\n<p>Consider then a filename of:<\/p>\n<pre>\/d\/nsr\/02\/63\/05\/cd3a182f-00000006-7b7801de-497801de-01871a00-3d2a4f4b<\/pre>\n<p>This isn&#8217;t just a random filename, it&#8217;s the saveset ID, but just in a format you may not used to.<\/p>\n<p>To get the long saveset ID in mminfo output, we use the (number) postfix on the <em>ssid<\/em> field. This would be as follows:<\/p>\n<pre># mminfo -q \"ssid=071462366\" -r \"ssid(53)\"\ncd3a182f-00000006-7b7801de-497801de-01871a00-3d2a4f4b<\/pre>\n<p>With that information in hand, you can then search for a file with the same name as the long saveset ID on disk.<\/p>\n<p>You can also do a reverse lookup. Say for instance, you know there&#8217;s an issue with a particular saveset file on a disk backup unit. To find out what the actual saveset ID is for this saveset, you can run the counter-query:<\/p>\n<pre>mminfo -q \"ssid=cd3a182f-00000006-7b7801de-497801de-01871a00-3d2a4f4b\" -r ssid<\/pre>\n<p>So, there you go &#8211; very easy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Generally speaking, you don&#8217;t want to be mucking around with the contents of your disk backup units except under extreme&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"categories":[6,16],"tags":[1243,1249,1253],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-basics","category-networker","tag-basics","tag-networker","tag-scripting"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-Q","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/52","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=52"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":7697,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions\/7697"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}