Operating System - HP-UX
1832864 Members
2776 Online
110048 Solutions
New Discussion

Re: Need help on frecover

 
Vidhya B
Frequent Advisor

Need help on frecover

Hi,

I have done a script for doing a daily activity. The script issues frecover command if a file is present everyday morning. I am using that script for past 4 months without any issues.

This is the command issued by the script.
root:\>frecover -xf dump.level? -g chennai.gfile
I get the output of this script in mail.

Recently, when I issue this command we are getting as below:

bkpsvr:root-/oracle/08May11]frecover -xf dump.level? -g chennai.gfile
frecover(5420): not an fbackup volume; magic value is incorrect
frecover(5412): Do you wish to try to salvage this volume? (^[yY]/^[nN])

My script has no purpose, because now i have to give the option N for the command to proceed. Sometimes its promting for Y/N 3 or 4 times.Is there any other way to give the option N in the command itself.


Kindly help.
28 REPLIES 28
Uday_S_Ankolekar
Honored Contributor

Re: Need help on frecover

What's the OS level? If it's 11.31 (11i v3) then there are some changes with uname related to fbackup.(The maximum value for fields returned via uname was increased from 8 to 256) Check the man pages of fbackup

-USA..
Good Luck..
Viktor Balogh
Honored Contributor

Re: Need help on frecover

you could supply the "N"s or "Y"s with an echo like this:

# echo "N" | frecover ..

but I don't think this would be a solution. You need to look after why you are getting this message. From this itrc post:

http://h30499.www3.hp.com/t5/System-Administration/fbackup/m-p/4729465#M386317

 

it seems to me that the tape isn't an frecover tape.

****
Unix operates with beer.
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

Please find my uname -a output.
bkpsvr:root-/]uname -a
HP-UX bkpsvr B.11.23 U ia64 2564450715 unlimited-user license


I tried the echo command. It didn't work.
Even this happens because of any backup issue, I won't be able to interfere in that.
So, Please help me with the command to recover it automatically.

Thanks in Advance!!!
Vivek_Pendse
Valued Contributor

Re: Need help on frecover

Instead of this option --> "-g chennai.gfile", you can modify your script like:

cat chennai.gile | awk '{print $1}'
frecover -xf .... -g $i

And, then receover the files one by one within the script only.

Thanks,
Vivek
Dennis Handly
Acclaimed Contributor

Re: Need help on frecover

Is this a fbackup volume or not? If not, it won't matter how many Y or N you use.
Bill Hassell
Honored Contributor

Re: Need help on frecover

> frecover(5420): not an fbackup volume; magic value is incorrect

This error is quite clear: the tape is not an fbackup tape and cannot be read by frecover. Somebody has destroyed your backup tape. If you do not eject the tape immediately after fbackup runs, then anyone with write permission for the tape drive can destroy the entire tape with a tar, cpio or even a dd. Your script should change to run frecover -V - to read the header. If frecpver cannot read the header, it will return with an error code. Do this first, then if successful, run your script to check for the file.


Bill Hassell, sysadmin
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi Vivek,

I am not able to understand wat exactly you mean. Can you give me the exact command.


Hi all,

Please find my frecover -V output.
bkpsvr:root-/oracle/09May11]frecover -V dump.level1
frecover(5403): Unable to open or identify device at /dev/rmt/0m

frecover(5405): unable to open /dev/rmt/0m
frecover(5406): Do you wish to continue? (^[yY]/^[nN]) y
frecover(5432): Media rewind failed
frecover(5402): failed close on device /dev/rmt/0m
frecover(5404): Press return when the next volume is ready on /dev/rmt/0m:


When issue the command manually, if I give Y, I am able to extract.
Kindly help me with the issue.
Vivek_Pendse
Valued Contributor

Re: Need help on frecover

Can you paste your script from which you are taking backup.
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

We are getting backup from another team. I won't be able to get the script for the backup. Hope they are using a tool for backup.We have to recover it.

I have writted a script which issue frecover command everyday.
Now the issue it recently I have been prompted for Y/N so that my script is unable to recover it.

I need a option to make it non-interactive.

Kindly help.
Vivek_Pendse
Valued Contributor

Re: Need help on frecover

As i told you, instead of reading the whole file, you can read line by line of that file & simultaneously restore it by frecover.
Dennis Handly
Acclaimed Contributor

Re: Need help on frecover

>frecover(5403): Unable to open or identify device at /dev/rmt/0m

Do you still have this tape device?
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

We receive medias regualarly. Catalog generated while backing up is transferred to us.

We need to recover it before restoring it.
So, We will issue frecover -xvf du.. -g chen.gfile everyday manually.

I have writted a script to automate it once we receive the catalog file in the backup server.

Recently when i issue this command, I was prompted for Y/N. I want to make it non-interactive so that no man power is needed. My script can do that work.

Kindly help.
Vidhya B
Frequent Advisor

Re: Need help on frecover

HI Vivek,

Kindly tell me how to recover it line by line. I am not getting your point. Can you give me in code?
Bill Hassell
Honored Contributor

Re: Need help on frecover

> frecover(5403): Unable to open or identify device at /dev/rmt/0m

You issued the frecover -V command without specifying a tape to read which is option -f. If you do not have a tape drive at /dev/rmt/0mn then you will get an error message. You will also get an error if there is no tape inserted in the drive.

Your first error message "magic value is incorrect" means that the tape in the drive is written in some other format -- it is not an fbackup tape and frecover can do nothing with it.

You script should be rewritten to handle all these errors:

1. The device file does not exist (test with -c)
2. There is no tape inserted (test with mt status option)
3. The tape is not in fbackup format (test with frecover -V)

If any of these tests fail, then your script should report the error and quit.


Bill Hassell, sysadmin
Vivek_Pendse
Valued Contributor

Re: Need help on frecover

Hi,

As you told in the past, you are restoring the files/directories from the file chennai.gfile every day.

So, just do:
cat chennai.gfile | awk {print $1}
frecover -xvX -f /dev/rmt/0m -i $i

I have not written exact lines..
Also, here in above frecover example, i used -X, so, please note: it will be restored in your PWD.

Please modify according to your requirement.

Hope, this helps you.

Thanks,
Vivek
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

If thats not the fbackup volume and frecover has nothing do with it, then how is it recovering if I give the option "Y" when I Prompted as below:

bkpsvr:root-/oracle/08May11]frecover -xf dump.level? -g chennai.gfile
frecover(5420): not an fbackup volume; magic value is incorrect
frecover(5412): Do you wish to try to salvage this volume? (^[yY]/^[nN])

I am able to restore the backup with the catalog that has been recovered after I give the option "Y".
Kindly tell me is there anyway that I can change my script so that it will become non-interactive and takes the option "Y" by itself.

Thanks In Advance!!!
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi Vivek,

We restore images from dump.level. Chennai.gfile is the graph file in which the path where the image has to be stored is mentioned.
Vivek_Pendse
Valued Contributor

Re: Need help on frecover

Hi Vidhya,

frecover can restore only the backup taken by fbackup.

Thanks,
Vivek
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

My issue is not that what I want is not getting recovered. Its getting recovered only if I give "Y" option.

So I want to make any change in my script so that "Y" option is given by it automatically without any manual intervention.
Dennis Handly
Acclaimed Contributor

Re: Need help on frecover

>We receive media regularly.

From what HP-UX version? 11.23 frestore can't handle 11.31 fbackup.

>It's getting recovered only if I give "Y" option.

We need proof it's doing something with your bad tape.

What does this show: mt -f /dev/rmt/0m status

>So I want to make any change in my script

It's not your script that has a problem, it's the tape. (Unless you want to follow Bill's suggestions about error handling.)
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

Version-11iv2

We are doing restoration daily using the catalog that is recovered everyday morning using the command frecover -xf dump.level? -g chennai.gfile.

So, Its evident that all the catalogs are getting recovered.

Is there any option in frecover to make it non-interactive.
Skip this "frecover(5420): not an fbackup volume; magic value is incorrect
frecover(5412): Do you wish to try to salvage this volume?"

But tell me is there anyway I can give Y for this "(^[yY]/^[nN])" using my script.

Thanks!!!
James R. Ferguson
Acclaimed Contributor

Re: Need help on frecover

Hi:

> Is there any option in frecover to make it non-interactive.

Bill already answered that question and gave you the solution when he wrote:

>> Your first error message "magic value is incorrect" means that the tape in the drive is written in some other format -- it is not an fbackup tape and frecover can do nothing with it.

You need to re-work your script to perform the up-front tests Bill described. Re-think your problem and re-factor your script.

Regards!

...JRF...

Dennis Handly
Acclaimed Contributor

Re: Need help on frecover

>It's evident that all the catalogs are getting recovered.

Are you really really sure?

This may happen if: 11.23 frestore can't handle 11.31 fbackup.

The "magic value is incorrect" because it different but the rest of the tape is close enough to recover.

The solution is to only run this on 11.31.
Vidhya B
Frequent Advisor

Re: Need help on frecover

Hi,

Does tat mean there is no option in frecover to do tat??