Operating System - HP-UX
1836417 Members
2578 Online
110100 Solutions
New Discussion

Re: fbackup exit code=2 how do i interpret this?

 
Bruce Duff
Advisor

fbackup exit code=2 how do i interpret this?

Hi,

I have been having trouble using fbackup on our K220. The backup has been failing each night with an exit code=2. I know there is a list of codes explaining this issue but I need to get the correct code in the first place. Is there a way of working out what is wrong. HP have already replaced the drive twice! and it still fails....

Any help on this niggly problem would be very much appreciated.

Thanks in advance.
London Giddy London
12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor

Re: fbackup exit code=2 how do i interpret this?

Hi Bruce:

You seem to know the 2 mean an unrecoverable error. The suggest that you add the -v argument to get more status messages. There are many things that can cause a backup to fail and the tape drive is only one of them. I would do an fbackup to another device maybe even stdout which in turns does a dd to /dev/null. If this works you at least know that it is not a data problem.
If it ain't broke, I can fix that.
Kofi ARTHIABAH
Honored Contributor

Re: fbackup exit code=2 how do i interpret this?

Bruce:

I found that if
a) I had a bad tape in the drive or
b) drive head is dirty
c) I did not have a tape in the drive at all,
I got the exit code 2. In addition to Clay's suggestions about -v for more logging. I would suggest the following:

1. Load a tape and try backing up a filesystem (eg. /tmp) and see if this finishes with code 0... if it does not, it is entirely possible that you are using 90m rather than 120m or vice-versa (assuming of course that you have cleaned the drive with no improvement)

The servers that I work with are all over the place and sometimes the operators forget to load tapes - or the tapes tend to be bad, so what I did was to write a script that does a test backup and retrieves the file for comparison. I run this script at 2:30 pm to generate a report of which tapes reported potential errors on tapes before end of day so that any bad tapes could be replaced before the evening's backup run. This cut down our backup problems down drastically.
nothing wrong with me that a few lines of code cannot fix!
Bruce Duff
Advisor

Re: fbackup exit code=2 how do i interpret this?

Dear all, Thanks for your responses. They have been helpful. Could you tell me where I need to use the -v option?

my crontab is as follows:
00 22 * * 1-5 /usr/sam/lbin/br_backup DAT FULL Y /dev/rmt/0m /etc/sam/br/graphBC
Aa04655 root Y 1 N > /var/tmp/SAM_br_msgs 2>&1 #sambackup

Does this go after the br_backup?

Let me know and I can try out a few options.

Thanks
Bruce
London Giddy London
Robin Wakefield
Honored Contributor

Re: fbackup exit code=2 how do i interpret this?

Hi,

br_backup will switch the -v flag on if the mail-to person is set to "_NONE". It might be best to edit the br_backup script temporarily for now, and switch the verbose_mode flag to -v (line 165 on my version).

Rgds, Robin.
Mark Vollmers
Esteemed Contributor

Re: fbackup exit code=2 how do i interpret this?

Bruce-

It looks like you are running backup thru Sam. If this is the case, you should have email in the root mail about each backup. Normally, it gives blocks backed up and any errors or warnings. If you wanted to see what it is doing, you can always run an interactive backup during the day and watch the window (or at least have it open). This way you will see where it hangs. One other possiblity that hasn't been mentioned is that you are over one tape. If you are running it thru sam, it will prompt for a second tape and then exit at some point, giving you an error. You will see this in interactive or in the root mail.

mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Bruce Duff
Advisor

Re: fbackup exit code=2 how do i interpret this?

Thanks again for more answers, I'll give it all a try. Just to let you know I have run interatcive with brand new 120mm dds2 tapes this afternoon which have run fine. The real test is the full backup scheduled for tonight. I will let you know and we can take it from there.

I'm not sure it is a tape length issue as the elm messages doesnt come up with that EOF error when its looking for another tape to be added. Thanks in advance everyone.
London Giddy London
Craig Rants
Honored Contributor

Re: fbackup exit code=2 how do i interpret this?

Bruce,
Just fyi, most man pages have a RETURN CODE section further explaining why a specific return code was assigned. In this case you probably would have read the fbackup man page and said, "Well I know that".

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Bruce Duff
Advisor

Re: fbackup exit code=2 how do i interpret this?

I now have fully working backup. Thanks for everyones input to helping me solve this problem. HP recommended to me to always use new tapes with a new drive. I have destroyed the previous tapes and from now on will use new DDS2 Tapes.
London Giddy London
Mark Vollmers
Esteemed Contributor

Re: fbackup exit code=2 how do i interpret this?

Bruce-

One thing that I have noted is that if you don't have HP tapes, you can have some problems. If you are going to use new tapes, you might as well order the HP ones. non-hp tapes might have been a contributing factor (if you were using them).

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Kofi ARTHIABAH
Honored Contributor

Re: fbackup exit code=2 how do i interpret this?

Bruce:

Glad to hear that you have "good" backups now. I have a couple of questions though:
1. Are you running a database on the server? because if you are - you need to shut it down before running your backup in order to have a valid backup.
2. Do you have an ignite DR tape for your server - this is very handy for OS recovery in case root disk failure.
3. Do you have a verification plan in place - ie. every month run a test restore to a server/filesystem to verify the integrity of your backups?

just some 2cents I thought I would share

cheers.
nothing wrong with me that a few lines of code cannot fix!
Bruce Duff
Advisor

Re: fbackup exit code=2 how do i interpret this?

Hi there

Thanks for the replies. The tapes being used are HP.

Glad to hear that you have "good" backups now. I have a couple of questions though:
1. Are you running a database on the server? because if you are - you need to shut it down before running your backup in order to have a valid backup.
No database like Oracle, just an ISAM database so thats not so much of an issue. Never has been before.

2. Do you have an ignite DR tape for your server - this is very handy for OS recovery in case root disk failure.

Yes, we do a make_recovery tape on a regular basis.

3. Do you have a verification plan in place - ie. every month run a test restore to a server/filesystem to verify the integrity of your backups?

Yes thats another part of the process. Thanks for your ideas.
London Giddy London