<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664167#M49124</link>
    <description>Hi,&lt;BR /&gt;you can recover files from tar archive to relative path if the archive was created with relative path. Full path - to full path.&lt;BR /&gt;Later,</description>
    <pubDate>Wed, 13 Feb 2002 16:05:47 GMT</pubDate>
    <dc:creator>Marcin Wicinski</dc:creator>
    <dc:date>2002-02-13T16:05:47Z</dc:date>
    <item>
      <title>tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664162#M49119</link>
      <description>Can someone tell me how I can extract files from a tar created tape and put them to a different disk/directory than the disk/directory from where the files were originally located?</description>
      <pubDate>Wed, 13 Feb 2002 15:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664162#M49119</guid>
      <dc:creator>Richard Buerger</dc:creator>
      <dc:date>2002-02-13T15:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664163#M49120</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;not possible with tar if you used the full directory path when creating the tar backup.&lt;BR /&gt;&lt;BR /&gt;tar -cf /dev/rmt/0m /tmp/file1&lt;BR /&gt;--&amp;gt; will be restored to /tmp/file1&lt;BR /&gt;&lt;BR /&gt;cd /&lt;BR /&gt;tar -cf /dev/rmt/0m tmp/file1&lt;BR /&gt;--&amp;gt; can be restored below current working directory.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 13 Feb 2002 16:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664163#M49120</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2002-02-13T16:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664164#M49121</link>
      <description>hi Richard,&lt;BR /&gt;&lt;BR /&gt;If the files were archived with the leading edge, you cannot extract them to another directory.&lt;BR /&gt;&lt;BR /&gt;Say you tarred using this format,&lt;BR /&gt;&lt;BR /&gt;tar cvf /dev/rmt/0m /home&lt;BR /&gt;&lt;BR /&gt;Now you cannot restore home to another directory. But if you tarred using this,&lt;BR /&gt;&lt;BR /&gt;cd /&lt;BR /&gt;tar cvf /dev/rmt/0m home&lt;BR /&gt;&lt;BR /&gt;you can restore it to any other directory, say /temp&lt;BR /&gt;&lt;BR /&gt;cd /temp&lt;BR /&gt;tar xvf /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;You can also try the solution suggested by harry in the link below if you have backed up using absolute path,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x38d6cf38d6bdd5118ff10090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x38d6cf38d6bdd5118ff10090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2002 16:03:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664164#M49121</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2002-02-13T16:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664165#M49122</link>
      <description>How were the files written to tape?  Were they written using absolute paths (/somedir/somefile) or relative paths (somedir/somefile or ./somedir/somefile)?  The answer depends.&lt;BR /&gt;&lt;BR /&gt;If they were written with relative paths, then it is easy.  You just cd to the dir you want to restore to and extract from the tape:&lt;BR /&gt;&lt;BR /&gt;# cd /mydir&lt;BR /&gt;# tar -xvf /dev/rmt/0m somedir/somefile&lt;BR /&gt;or&lt;BR /&gt;# tar -xvf /dev/rmt/0m ./somedir/somefile&lt;BR /&gt;&lt;BR /&gt;If the files were written to the tape using absolute paths, its a bit more difficult, but not impossible.  You can try using pax for this ('man pax' for more info):&lt;BR /&gt;&lt;BR /&gt;Here's an example from the pax man page:&lt;BR /&gt;&lt;BR /&gt;To read the archive a.pax, with all files rooted in the directory /usr in the archive extracted relative to the current directory, enter:&lt;BR /&gt;&lt;BR /&gt;# pax -r -s ',//*usr//*,,' -f a.pax&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2002 16:04:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664165#M49122</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-02-13T16:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664166#M49123</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You need to use 'relative path' methord here. While backing up your data, you have to privide the relative paths. For eg: if you want to backup /home/dir1 and restore it to /usr1/dir1, then:&lt;BR /&gt;# cd /home/dir1 &lt;BR /&gt;# tar -cvf /dev/rmt/0m .&lt;BR /&gt;# cd /usr1/dir1&lt;BR /&gt;# tar -xvf /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;This will restore the dir1 to the current directory. If you are using 'absolute path' for backing up data (tar -cvf /dev/rmt/0m /home/dir1), that will restore the data to the original location.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju</description>
      <pubDate>Wed, 13 Feb 2002 16:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664166#M49123</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-02-13T16:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664167#M49124</link>
      <description>Hi,&lt;BR /&gt;you can recover files from tar archive to relative path if the archive was created with relative path. Full path - to full path.&lt;BR /&gt;Later,</description>
      <pubDate>Wed, 13 Feb 2002 16:05:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664167#M49124</guid>
      <dc:creator>Marcin Wicinski</dc:creator>
      <dc:date>2002-02-13T16:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664168#M49125</link>
      <description>Sanjay, it was Thierry ...not Harry ! =))&lt;BR /&gt;&lt;BR /&gt;Shiju</description>
      <pubDate>Wed, 13 Feb 2002 16:08:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664168#M49125</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-02-13T16:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664169#M49126</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Confirm you cannot&lt;BR /&gt;&lt;BR /&gt;Best is to copy the current contents to another place&lt;BR /&gt;&lt;BR /&gt;restore tar&lt;BR /&gt;&lt;BR /&gt;move restored files to new place&lt;BR /&gt;&lt;BR /&gt;move back originals&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;       Steve Steel</description>
      <pubDate>Wed, 13 Feb 2002 16:09:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664169#M49126</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-02-13T16:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664170#M49127</link>
      <description>Hi Richard,&lt;BR /&gt;&lt;BR /&gt;First use tar tvf to see if the tarfile was created with relative or absolute paths.  If relative, cd to the directory you want and the files / dirs will be extracted relative to that directory.&lt;BR /&gt;&lt;BR /&gt;If created with an absolute path, use pax (see Patrick's suggestion).&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 13 Feb 2002 16:14:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664170#M49127</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-13T16:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664171#M49128</link>
      <description>Here's a link with more info:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x589bd5fab40ed6118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x589bd5fab40ed6118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 13 Feb 2002 16:17:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664171#M49128</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-13T16:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664172#M49129</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Check this out:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://us-support2.external.hp.com/cki/bin/doc.pl/sid=3ac31176034e2576cd/screen=ckiDisplayDocument?docId=200000047257225" target="_blank"&gt;http://us-support2.external.hp.com/cki/bin/doc.pl/sid=3ac31176034e2576cd/screen=ckiDisplayDocument?docId=200000047257225&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Feb 2002 16:21:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/2664172#M49129</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-02-13T16:21:41Z</dc:date>
    </item>
  </channel>
</rss>

