{"id":923,"date":"2009-08-29T06:47:32","date_gmt":"2009-08-28T20:47:32","guid":{"rendered":"http:\/\/nsrd.wordpress.com\/?p=923"},"modified":"2018-12-12T15:48:00","modified_gmt":"2018-12-12T05:48:00","slug":"basics-what-inode-did-that-file-have-when-it-was-backed-up","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2009\/08\/29\/basics-what-inode-did-that-file-have-when-it-was-backed-up\/","title":{"rendered":"Basics &#8211; What inode did that file have when it was backed up?"},"content":{"rendered":"<p>I had an odd question recently from a customer &#8211; they wanted to know whether NetWorker could tell them what inode a file had when it was backed up. Thankfully, having previous experience with NetWorker and <a title=\"AdvFS\" href=\"http:\/\/en.wikipedia.org\/wiki\/AdvFS\" target=\"_blank\">AdvFS<\/a>, I knew that NetWorker did keep track of inode details during the backup.<\/p>\n<p>The way to find this out is to use the nsrinfo command. Let&#8217;s say we&#8217;ve got a directory\/mount-point, &#8216;\/var&#8217;, and we want to see what inode it had during backup. In this case, the command that you would run would be:<\/p>\n<pre># nsrinfo -N \/var\/ clientName<\/pre>\n<p>(Note the use of &#8220;\/var\/&#8221;, not &#8220;\/var&#8221;.)<\/p>\n<p>So if I want to find this information out for the client &#8216;nox&#8217;, I&#8217;d run:<\/p>\n<div id=\"_mcePaste\" style=\"position:absolute;left:-10000px;top:0;width:1px;height:1px;\">[root@nox ~]# nsrinfo -vV -N \/var\/ nox<\/div>\n<div id=\"_mcePaste\" style=\"position:absolute;left:-10000px;top:0;width:1px;height:1px;\">scanning client `nox&#8217; for all savetimes from the backup namespace<\/div>\n<div id=\"_mcePaste\" style=\"position:absolute;left:-10000px;top:0;width:1px;height:1px;\">UNIX ASDF v2 file `\/var\/&#8217;, size=660, off=3456572, app=backup(1), date=1251459999 Fri 28 Aug 2009 09:46:39 PM EST, fid = 2304.2147905, file size=4096<\/div>\n<div id=\"_mcePaste\" style=\"position:absolute;left:-10000px;top:0;width:1px;height:1px;\">ndirentry-&gt;2639214<span style=\"white-space:pre;\"> <\/span>ftp\/<\/div>\n<pre>[root@nox ~]# nsrinfo -vV -N \/var\/ nox\nscanning client `nox' for all savetimes from the backup namespace\nUNIX ASDF v2 file `\/var\/', size=660, off=3456572, app=backup(1),&nbsp;\ndate=1251459999 Fri 28 Aug 2009 09:46:39 PM EST, fid = 2304.2147905,&nbsp;\nfile size=4096\n&nbsp;&nbsp;ndirentry-&gt;2639214<span style=\"white-space:pre;\">\t<\/span>ftp\/<\/pre>\n<p>(The rest of the output has been snipped.)<\/p>\n<p>So where, you might wonder, is the inode detail stored in all of this? Look for the &#8216;fid = X.Y&#8217; part of the output; the inode number is Y &#8211; in this case, 2147905. We can verify that by running stat against the directory:<\/p>\n<pre>[root@nox ~]# stat \/var\n&nbsp;&nbsp;File: `\/var'\n&nbsp;&nbsp;Size: 4096 &nbsp; &nbsp; &nbsp;<span style=\"white-space:pre;\">\t<\/span>Blocks: 16 &nbsp; &nbsp; &nbsp; &nbsp; IO Block: 4096 &nbsp; directory\nDevice: 900h\/2304d<span style=\"white-space:pre;\">\t<\/span>Inode: 2147905 &nbsp; &nbsp; Links: 25\nAccess: (0755\/drwxr-xr-x) &nbsp;Uid: ( &nbsp; &nbsp;0\/ &nbsp; &nbsp;root) &nbsp; Gid: ( &nbsp; &nbsp;0\/ &nbsp; &nbsp;root)<\/pre>\n<p>As you can see, the inodes match.<\/p>\n<p>So there you have it &#8211; you can use NetWorker to confirm\/check what inode number a file or directory had when it was backed up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had an odd question recently from a customer &#8211; they wanted to know whether NetWorker could tell them what&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],"tags":[482,662,937],"class_list":["post-923","post","type-post","status-publish","format-standard","hentry","category-basics","tag-inode","tag-nsrinfo","tag-stat"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-eT","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/923","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=923"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/923\/revisions"}],"predecessor-version":[{"id":7621,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/923\/revisions\/7621"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}