{"id":104,"date":"2008-09-18T05:51:58","date_gmt":"2008-09-17T21:51:58","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/?p=104"},"modified":"2008-09-18T05:51:58","modified_gmt":"2008-09-17T21:51:58","slug":"restoring-file-from-ufsdump-backup","status":"publish","type":"post","link":"https:\/\/www.sysadmindayph.com\/blog\/restoring-file-from-ufsdump-backup\/","title":{"rendered":"Restoring File From UFSdump Backup"},"content":{"rendered":"<p>Here&#8217;s what we did today on one of our Solaris box that is worth mentioning on this cool super system administrator&#8217;s blog &#8216;o mine! (Don&#8217;t you find it cool that SysAds are so funny?!)<\/p>\n<p>Anyhoo, today we re-jumpstarted a laboratory box because the &#8216;owner&#8217; of it wants it back. Since we pretty much messed it up, I have to jumpstarted a fresh copy.<\/p>\n<p>After installing returned the original \/etc\/shadow and \/etc\/passwd back from backup (had a backup file on the laptop).. but unfortunately, the \/etc\/shadow file is &#8216;null&#8217;.<\/p>\n<p><strong>Restoring File From UFSdump Backup<\/strong><\/p>\n<p>Here&#8217;s the procedure in restoring a particular file from ufs dump backup&#8230; Of course if you&#8217;re restoring from ufs backup you probably made a ufs backup in the first place, right? Right!<\/p>\n<p>In this example, the files backup.examples and junk are restored from the pubs directory:<\/p>\n<p><!--more--><\/p>\n<p># cd \/var\/tmp<br \/>\n# ufsrestore if \/dev\/rmt\/\u00d8<br \/>\nufsrestore &gt; ls<br \/>\n.:<br \/>\nlost+found\/   pubs\/<\/p>\n<p>ufsrestore &gt; cd pubs<br \/>\nufsrestore &gt; ls<br \/>\n.\/pubs:<br \/>\n.Xauthority        .login              .profile          backup.examples%<br \/>\n.Xdefaults         .mtdeletelog        .wastebasket\/     core<br \/>\n.cshrc             .openwin-init       Junk\/             dead.letter<br \/>\n.desksetdefaults   .openwin-init.BAK   backup.examples   junk<\/p>\n<p>ufsrestore &gt; add backup.examples<br \/>\nufsrestore &gt; add junk<br \/>\nufsrestore &gt; setmodes<br \/>\nset owner\/mode for &#8216;.&#8217;? [yn] n<br \/>\nufsrestore &gt; extract<br \/>\nYou have not read any volumes yet.<br \/>\nUnless you know which volume your file(s) are on you should start<br \/>\nwith the last volume and work towards the first.<br \/>\nSpecify next volume #: 1<br \/>\nset owner\/mode for &#8216;.&#8217;? [yn] n<br \/>\nufsrestore &gt; quit<br \/>\n# ls -l<br \/>\ntotal 6<br \/>\ndrwxrwxrwt   3 sys      sys          512 Mar 11 1\u00d8:36 .\/<br \/>\ndrwxrwxr-x  18 root     sys          512 Mar 1\u00d8 16:43 ..\/<br \/>\ndrwxr-xr-x   2 pubs     staff        512 Mar 11 1\u00d8:11 pubs\/<br \/>\n# pwd<br \/>\n\/var\/tmp<br \/>\n# cd pubs<br \/>\n# ls<br \/>\n.\/                ..\/               backup.examples   junk<br \/>\n#<\/p>\n<p>There you go!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s what we did today on one of our Solaris box that is worth mentioning on this cool super system administrator&#8217;s blog &#8216;o mine! (Don&#8217;t you find it cool that SysAds are so funny?!) Anyhoo, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,5,25,8],"tags":[99,100,98,95,97,96],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-commands","category-solaris","category-solaris-10","category-tips","tag-file","tag-passwd","tag-shadow","tag-ufs","tag-ufsbackup","tag-ufsrestore"],"_links":{"self":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":0,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}