<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TAR Restore in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537908#M900583</link>
    <description>Hi Claudio,&lt;BR /&gt;&lt;BR /&gt;There is a way using pax which can read a tar archive. As had been mentioned, you should make your backups using relative paths to make life simpler.&lt;BR /&gt;&lt;BR /&gt;For my example, I assume that I originally did a tar backup of /home which contains many directories.&lt;BR /&gt;&lt;BR /&gt;e.g. tar cvf /dev/rmt/3m /home&lt;BR /&gt;&lt;BR /&gt;Now lets say that I want just /home/cstephen (and all of his files) but not /home/user1, /home/user2, ...&lt;BR /&gt;AND &lt;BR /&gt;I want to restore  cstephen's files to&lt;BR /&gt;/tmp/acs&lt;BR /&gt;&lt;BR /&gt;This is very much like your situation. Here's the command:&lt;BR /&gt;&lt;BR /&gt;pax -r -f /dev/rmt/3m -s ',/home/cstephen,/tmp/acs,' /home/cstephen&lt;BR /&gt;&lt;BR /&gt;The effect of this command is to do an extract from device /dev/rmt/3m (which CAN be a previous tar or a cpio) and match the /home/cstephen files. The -s argument tells it to substitute /tmp/acs anytime it matches /home/cstephen. The commas are used as delimiters rather than the typical slash but you can choose other delimiters id comma's are embedded in your filenames. &lt;BR /&gt;&lt;BR /&gt;Man pax for details. &lt;BR /&gt;&lt;BR /&gt;This should do the trick, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 07 Jun 2001 15:28:04 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2001-06-07T15:28:04Z</dc:date>
    <item>
      <title>TAR Restore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537904#M900579</link>
      <description>Hi All!&lt;BR /&gt;again... When I try to restore files from a tape using tar command, I write: &lt;BR /&gt;tar xvf /dev/rmt/3m /local/name_of_file&lt;BR /&gt;than the file is restored in original location, but I need to put it in another local. How can I do?&lt;BR /&gt;Thanx.</description>
      <pubDate>Thu, 07 Jun 2001 14:37:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537904#M900579</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2001-06-07T14:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: TAR Restore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537905#M900580</link>
      <description>Hi Claudio&lt;BR /&gt;&lt;BR /&gt;The tar extracts files back in the Path they were written as , ie in cae you used to back them up using tar cvf /dev/rmt /etc/passwd then it can restored only in /etc/passwd . There is one other way in case you can take the back up again take it as go to that directory and issue tar cvf /dev/rmt &lt;FILE names=""&gt; , so that the  files are stored w/o the path , then you can restore it back by going to that directory and giving the xvf command. &lt;BR /&gt;Ofcourse you have the option to the move the files in case there is no other way.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;/FILE&gt;</description>
      <pubDate>Thu, 07 Jun 2001 14:54:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537905#M900580</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-06-07T14:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: TAR Restore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537906#M900581</link>
      <description>Hi,&lt;BR /&gt;There may be not much to do other than move the file yourself, because it seems you saved with absolute path...&lt;BR /&gt;The only solution I see is if the file already exists, is to move it somewhere else, then restore from the tape the one from TAR...&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Victor</description>
      <pubDate>Thu, 07 Jun 2001 14:56:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537906#M900581</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2001-06-07T14:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: TAR Restore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537907#M900582</link>
      <description>You might be able to use the "pax" utility instead. It can read tar save tapes, and has the additional option of changing the name paths as it restores. example-&lt;BR /&gt;&lt;BR /&gt;pax -r -f mysave.tar -s:^/usr/etc:/newpath:&lt;BR /&gt;&lt;BR /&gt;It will still be an absolute path, but you can restore it to a different location!</description>
      <pubDate>Thu, 07 Jun 2001 15:22:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537907#M900582</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2001-06-07T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: TAR Restore</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537908#M900583</link>
      <description>Hi Claudio,&lt;BR /&gt;&lt;BR /&gt;There is a way using pax which can read a tar archive. As had been mentioned, you should make your backups using relative paths to make life simpler.&lt;BR /&gt;&lt;BR /&gt;For my example, I assume that I originally did a tar backup of /home which contains many directories.&lt;BR /&gt;&lt;BR /&gt;e.g. tar cvf /dev/rmt/3m /home&lt;BR /&gt;&lt;BR /&gt;Now lets say that I want just /home/cstephen (and all of his files) but not /home/user1, /home/user2, ...&lt;BR /&gt;AND &lt;BR /&gt;I want to restore  cstephen's files to&lt;BR /&gt;/tmp/acs&lt;BR /&gt;&lt;BR /&gt;This is very much like your situation. Here's the command:&lt;BR /&gt;&lt;BR /&gt;pax -r -f /dev/rmt/3m -s ',/home/cstephen,/tmp/acs,' /home/cstephen&lt;BR /&gt;&lt;BR /&gt;The effect of this command is to do an extract from device /dev/rmt/3m (which CAN be a previous tar or a cpio) and match the /home/cstephen files. The -s argument tells it to substitute /tmp/acs anytime it matches /home/cstephen. The commas are used as delimiters rather than the typical slash but you can choose other delimiters id comma's are embedded in your filenames. &lt;BR /&gt;&lt;BR /&gt;Man pax for details. &lt;BR /&gt;&lt;BR /&gt;This should do the trick, Clay&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Jun 2001 15:28:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-restore/m-p/2537908#M900583</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-06-07T15:28:04Z</dc:date>
    </item>
  </channel>
</rss>

