1831323 Members
3421 Online
110023 Solutions
New Discussion

backup exit code = 2

 
Paul Wright
Advisor

backup exit code = 2

I had a backup fail after running for 5:40 last night with an exit code = 2. Does anybody know what exit code 2 means? I cannot find any info on these exit codes at all.
ANY help would be greatly appreciated.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: backup exit code = 2

Hi Paul:

What backup utility? If 'fbackup' then a return code=2 denotes any error that prevents continuing the session. See the man pages for 'fbackup'.

Regards!

...JRF...
Steve Steel
Honored Contributor

Re: backup exit code = 2

Hi

fbackup has the following exit codes:

1. A warning return value is introduced to notice the operator that fbackup ends with the warnings. The following explanations can be found in fbackup(1M) man page:
fbackup returns one of the following values.
0 upon normal completion.
1 if it is interrupted but allowed to save its state for possible restart.
2 if any error conditions prevent the session from completing.
4 if any warning conditions are encountered.

Exit code 1 is used if there was operator intervention and the state
was saved so that the backup can be resumed later. (Intervention w/o
saving the state would mean exit code 2.) Either this isn't very
popular or relatively bug-free and easy to use, since I never got
a question about it.

In the case of an exit code 2, the lats few messages in the log should
tell you what happened. Typical reasons are: bad tape, dirty tape drive,
etc. while installing the latest fbackup patch often helps too.
You can't tell the failure reason from the exit code 2 alone. There are
a number of things fbackup needs to set up (shared memory, semaphore,
start child processes, sort the index) where a fatal error could occur.
Later errors tend to be unspecific (the "could happen anytime" category
would include an I/O problem with the output device or a failed malloc,
the "should not happen" category that a process got killed).

(All messages are in the format derived from
"dumpmsg /usr/lib/nls/msg/C/fbackup.cat". )



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Mark Vollmers
Esteemed Contributor

Re: backup exit code = 2

Paul-

Steve has a good explaination on what it means. Easy things to check are tape, clean the drive, etc. If you happened to get an email to root, normally that will point you in the right direction. Also, you can look in the syslog, sometimes things will show up there that might indicate what caused the error. One other thing, depending on how you have it set up, is that it might be a full tape. I have my backup setup through SAM, and if it wants a second tape, it will exit as opposed to prompting for the second tape. Some things to look into.

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

Re: backup exit code = 2

Hi,

I have seen this before. Tape full or defect or drive dirty will be the source of the error.

Clemens
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !