<?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: frecover in a script .. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628753#M40540</link>
    <description>If all you want is a listing of the files on the tape, there is a much easier (and 100x faster) way to do this:&lt;BR /&gt;&lt;BR /&gt;/usr/bin/frecover -I /tmp/listing -f /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;Unlike legacy tools like tar and cpio, all the files that were selected at the start of the backup will be listed.  The -xNv options will require reading (and computing extra checksums) for the whole tape...possible hours. The -I option can be completed in a couple of minutes.</description>
    <pubDate>Tue, 11 Dec 2001 03:33:55 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2001-12-11T03:33:55Z</dc:date>
    <item>
      <title>frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628738#M40525</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I have a little script to write the contents of a tape to an output file.&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/frecover -xNv -f /dev/rmt/0m 2&amp;gt;/tmp/listing&lt;BR /&gt;&lt;BR /&gt;I can run this command without a problem from command line.  However, when I try and run it from a script I get "unable to find device file /dev/rmt/0m"&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thank you all very much,&lt;BR /&gt;Sally</description>
      <pubDate>Mon, 10 Dec 2001 17:45:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628738#M40525</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T17:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628739#M40526</link>
      <description>Try to do a rewind before calling the frecover&lt;BR /&gt;&lt;BR /&gt;mt -t /dev/rmt/0m rewind</description>
      <pubDate>Mon, 10 Dec 2001 17:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628739#M40526</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T17:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628740#M40527</link>
      <description>You must run this script as root, or in root's cron.&lt;BR /&gt;&lt;BR /&gt;How are you running the script?</description>
      <pubDate>Mon, 10 Dec 2001 17:49:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628740#M40527</guid>
      <dc:creator>Alan Casey</dc:creator>
      <dc:date>2001-12-10T17:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628741#M40528</link>
      <description>I am really taking a risk here.... Is it a O or a 0 in your script??? (sorry in advance if dumb response)&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 10 Dec 2001 17:49:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628741#M40528</guid>
      <dc:creator>Christopher McCray_1</dc:creator>
      <dc:date>2001-12-10T17:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628742#M40529</link>
      <description>I am guessing that this command follows another that is accessing the drive. You are probably not allowing enough time between commands. One easy answer is to add a sleep to your script.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Dec 2001 17:50:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628742#M40529</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-12-10T17:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628743#M40530</link>
      <description>Thats a good point Chris (checking those things is never a bad idead).  In Fact you might want to cut the line right out of the script to make sure there is nothing else different.  Also, are you running the shebang in your script. &lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;or whatever shell you are using</description>
      <pubDate>Mon, 10 Dec 2001 17:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628743#M40530</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T17:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628744#M40531</link>
      <description>In response to all the above questions:&lt;BR /&gt;&lt;BR /&gt;1.  I tried the mt -t dev rewind and it did not work&lt;BR /&gt;&lt;BR /&gt;2.  I am not doing anything else beforehand with the device - so it is not busy&lt;BR /&gt;&lt;BR /&gt;3.  I definitely have /dev/rmt/0m (I always check for typos first)&lt;BR /&gt;&lt;BR /&gt;Basically, I run the script and get the error.  I go to the command line and type exactly what I have in the script and it runs fine.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the quick responses,&lt;BR /&gt;Sally</description>
      <pubDate>Mon, 10 Dec 2001 18:26:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628744#M40531</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T18:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628745#M40532</link>
      <description>I also wanted to mention that I have other scripts that run frecover - but they are actually restoring data and they work fine.  It is just trying to get a tape listing that is giving me the headache.</description>
      <pubDate>Mon, 10 Dec 2001 18:44:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628745#M40532</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628746#M40533</link>
      <description>Sally,&lt;BR /&gt;&lt;BR /&gt;you might want to do an fuser on the device file in the script (just to see) and make it doesn't show anything.  Also, have to tried a different device file, like /dev/rmt/0mn</description>
      <pubDate>Mon, 10 Dec 2001 19:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628746#M40533</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T19:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628747#M40534</link>
      <description>Sally, &lt;BR /&gt;&lt;BR /&gt;One more thing.  run the env command on the command line and from your script.  See of there any differences, it is possible that LANG or some other environment variable is getting changed and not allowing to you access the device file properly.</description>
      <pubDate>Mon, 10 Dec 2001 19:37:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628747#M40534</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T19:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628748#M40535</link>
      <description>Jeff,&lt;BR /&gt;&lt;BR /&gt;fuser didn't show anything and the env was the same.  Also, I tried /dev/rmt/0mn and it didn't work either.&lt;BR /&gt;&lt;BR /&gt;The error message that comes up is that the device is not found - then goes on to say unable to use the device, etc.</description>
      <pubDate>Mon, 10 Dec 2001 19:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628748#M40535</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T19:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628749#M40536</link>
      <description>ok, lets try this.  Change the frecover command to:&lt;BR /&gt;&lt;BR /&gt;tar -tvf /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;Run the script and check the error.  If the error says Checksum, or blocksize error the problem is in the frecover, it you get can't open file /dev/rmt/0m  then there is an issue in script.  Then we can troubleshoot from there</description>
      <pubDate>Mon, 10 Dec 2001 20:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628749#M40536</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T20:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628750#M40537</link>
      <description>Ok Jeff,&lt;BR /&gt;&lt;BR /&gt;Ran your request and got the checksum error.  So I guess the problem is with frecover.  But as mentioned before, frecover runs perfectly if I am restoring something...I only run into this problem when I just want a tape listing.  Again, I am running:&lt;BR /&gt;&lt;BR /&gt;frecover -xNv -f /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Sally</description>
      <pubDate>Mon, 10 Dec 2001 20:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628750#M40537</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T20:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628751#M40538</link>
      <description>Sally,&lt;BR /&gt;&lt;BR /&gt;couple more things to try.  First, put a -y in the options.  This way if there are any questions asked you won't messed up waiting for a prompt when you output is going to a file.  Also,  You may want to leave out the -f dev part.  /dev/rmt/0m is the default if nothing is specified, I wounldn't know why that would help, but it would be interesting to see what happened.</description>
      <pubDate>Mon, 10 Dec 2001 20:43:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628751#M40538</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T20:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628752#M40539</link>
      <description>Thanks Jeff, that worked!  So when you use frecover to do a listing leave off the -f /dev/rmt/0m...I guess if it worked then that is good enough for me, but it makes no sense considering the other scripts work using the -f switch.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Sally</description>
      <pubDate>Mon, 10 Dec 2001 21:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628752#M40539</guid>
      <dc:creator>Sally  Devine</dc:creator>
      <dc:date>2001-12-10T21:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: frecover in a script ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628753#M40540</link>
      <description>If all you want is a listing of the files on the tape, there is a much easier (and 100x faster) way to do this:&lt;BR /&gt;&lt;BR /&gt;/usr/bin/frecover -I /tmp/listing -f /dev/rmt/0m&lt;BR /&gt;&lt;BR /&gt;Unlike legacy tools like tar and cpio, all the files that were selected at the start of the backup will be listed.  The -xNv options will require reading (and computing extra checksums) for the whole tape...possible hours. The -I option can be completed in a couple of minutes.</description>
      <pubDate>Tue, 11 Dec 2001 03:33:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/frecover-in-a-script/m-p/2628753#M40540</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-12-11T03:33:55Z</dc:date>
    </item>
  </channel>
</rss>

