<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885190#M101799</link>
    <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;If you decide recover the whole content of the tape in a temporary directory, i.e:&lt;BR /&gt;#cd temporal&lt;BR /&gt;#tar xv . &lt;BR /&gt;&lt;BR /&gt;When the recovery process concludes, simply moves requested tree (/data/pine) to the appropriate place.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
    <pubDate>Sun, 19 Jan 2003 18:04:58 GMT</pubDate>
    <dc:creator>Jose Mosquera</dc:creator>
    <dc:date>2003-01-19T18:04:58Z</dc:date>
    <item>
      <title>tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885187#M101796</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;is this right for extract a specif directory from archive.tar &lt;BR /&gt;&lt;BR /&gt;#dir to extract /data/pine and all subdir under /data/pine&lt;BR /&gt;&lt;BR /&gt;tar xvf /dev/rmt/0m /data/pine &lt;BR /&gt;&lt;BR /&gt;tar xvf /dev/rmt/0m /data/pine &lt;BR /&gt;&lt;BR /&gt;Which is the correct one ?&lt;BR /&gt;Thanks</description>
      <pubDate>Sun, 19 Jan 2003 15:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885187#M101796</guid>
      <dc:creator>Supporto Unix</dc:creator>
      <dc:date>2003-01-19T15:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885188#M101797</link>
      <description>I'd not define the file /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;tar xv /data/pine&lt;BR /&gt;&lt;BR /&gt;tar defaults to tape as a source for writing and reading.&lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;&lt;BR /&gt;cd /data/pine&lt;BR /&gt;&lt;BR /&gt;tar xv &lt;BR /&gt;&lt;BR /&gt;But I don't have access to a UX box right now, so try the test command first.&lt;BR /&gt;&lt;BR /&gt;cd /data/pine&lt;BR /&gt;&lt;BR /&gt;tar tv &lt;BR /&gt;&lt;BR /&gt;t is for test&lt;BR /&gt;&lt;BR /&gt;or tar tvf /dev/rmt/0m /data/pine&lt;BR /&gt;&lt;BR /&gt;See what's going to happen before you write something you might need to clean up.&lt;BR /&gt;&lt;BR /&gt;Question.  Is the original data source another machine? /data/pine directory perhaps?&lt;BR /&gt;&lt;BR /&gt;Question. the two commands above seem to be duplicates, what difference am I missing?&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 19 Jan 2003 17:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885188#M101797</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-01-19T17:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885189#M101798</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This deppend of the way that was created in the source place.&lt;BR /&gt;&lt;BR /&gt;If your default tape device is /dev/rmt/0m you can obviate "-f /dev/rmt/0m" option.&lt;BR /&gt;&lt;BR /&gt;A tip for this is doing a tar tv, this ecreen output will show you the tar tape content.&lt;BR /&gt;&lt;BR /&gt;Case 1: if your you see something as:&lt;BR /&gt;./root_dir/dir2/data/pine/etc...&lt;BR /&gt;this mean that tar have created in the source from "/" dir, so you need recover from "/". In this case, be careful with the rest of stored dirs, they could re-write some not wanted structure. tar xv ./root_dir/dir2/data/pine/&lt;BR /&gt;&lt;BR /&gt;Case 2: if you see directly files that belong at the /data/pine dir structure, you must create first /data/pine tree, and then from there, execute "tar xv ." command.&lt;BR /&gt;&lt;BR /&gt;In any case, to avoid risky situations, create a temporary dir with enough restoring space, then put inside and restore whole content by:&lt;BR /&gt;tar xv .&lt;BR /&gt;&lt;BR /&gt;Important: protects the tape to avoid not wanted writing.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Sun, 19 Jan 2003 17:56:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885189#M101798</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2003-01-19T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885190#M101799</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;If you decide recover the whole content of the tape in a temporary directory, i.e:&lt;BR /&gt;#cd temporal&lt;BR /&gt;#tar xv . &lt;BR /&gt;&lt;BR /&gt;When the recovery process concludes, simply moves requested tree (/data/pine) to the appropriate place.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Sun, 19 Jan 2003 18:04:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885190#M101799</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2003-01-19T18:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885191#M101800</link>
      <description>tar x /data/pine&lt;BR /&gt;tar xv /data/pine&lt;BR /&gt;tar xvf /dev/rmt/0m /data/pine&lt;BR /&gt;tar -xvf /dev/rmt/0m /data/pine&lt;BR /&gt;&lt;BR /&gt;All the above will extract /data/pine from /dev/rmt/0m (tape drive) to /data/pine.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Sun, 19 Jan 2003 18:33:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885191#M101800</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2003-01-19T18:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885192#M101801</link>
      <description>As with everything in Unix, the answer is: It Depends!&lt;BR /&gt;&lt;BR /&gt;The syntax you use to extract from a tar archive depends ENTIRELY on how the archive was created.&lt;BR /&gt;&lt;BR /&gt;Here are 3 different exaples:&lt;BR /&gt;&lt;BR /&gt;1)  If the archive was created like this:&lt;BR /&gt;&lt;BR /&gt;# tar -cvf /dev/rmt/0m /data/pine&lt;BR /&gt;&lt;BR /&gt;Then you restore it like this:&lt;BR /&gt;&lt;BR /&gt;# tar -xvf /dev/rmt/0m /data/pine&lt;BR /&gt;&lt;BR /&gt;Note that your only option for restoring, unless you use 'pax' ('man pax' for more information), is to restore back to its original location, /data/pine.&lt;BR /&gt;&lt;BR /&gt;2)  If the archive was created like this:&lt;BR /&gt;&lt;BR /&gt;# tar -cvf /dev/rmt/0m ./data/pine&lt;BR /&gt;&lt;BR /&gt;Note the . in front of the directory name.&lt;BR /&gt;&lt;BR /&gt;Then you restore it like this:&lt;BR /&gt;&lt;BR /&gt;# tar -xvf /dev/rmt/0m ./data/pine&lt;BR /&gt;&lt;BR /&gt;In this situation you can restore it to any sub-directory since it will restore using relative directory paths (remember the ./).  This means it will created the data/pine directory structure in whatever directory you are currently in.&lt;BR /&gt;&lt;BR /&gt;3)  If the archive was created like this:&lt;BR /&gt;&lt;BR /&gt;# tar -cvf /dev/rmt/0m data/pine&lt;BR /&gt;&lt;BR /&gt;Then you restore it like this:&lt;BR /&gt;&lt;BR /&gt;# tar -xvf /dev/rmt/0m data/pine&lt;BR /&gt;&lt;BR /&gt;Again, since this is using relative paths, so when you restore the directory structure will be created in whatever directory you are currently in.&lt;BR /&gt;&lt;BR /&gt;The best thing to do to figure out how to restore is to do a:&lt;BR /&gt;&lt;BR /&gt;# tar -tvf /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;This will list the names of all the files on the tape.  Kind of like a table of contents.  See 'man tar' for more information.&lt;BR /&gt;&lt;BR /&gt;When you see the output the 'tar -tvf' gives, you can then determine for certain which method above you can use to do the restore.&lt;BR /&gt;&lt;BR /&gt;Good luck.</description>
      <pubDate>Sun, 19 Jan 2003 19:42:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/2885192#M101801</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-01-19T19:42:07Z</dc:date>
    </item>
  </channel>
</rss>

