Operating System - HP-UX
1822959 Members
3665 Online
109645 Solutions
New Discussion юеВ

Re: SAM -fbackup exit code

 
SOLVED
Go to solution
ckchai
Frequent Advisor

SAM -fbackup exit code

Hi,

I have a few automated fbackup schedule using SAM.

Some of the fbackup run with exit code=4, and some with exit code=2.

When check at the man page, it only say exit code=2 is Error, while Exit code=4 is Warning.

How can I find out what is the cause of my fbackup failure? Is it tape full? Is it bad media?
So far I have look into /var/adm/fbackupfiles, it also didn't state the cause of failure there.

Below is the example of error message at SAM:

Full backup started on mpcim1 : Thu Dec 1 05:39:00 mal 2005 (Scheduled Backup)
{ fbackup -0 -u -g /etc/sam/br/graphOEAa23245 -I /var/sam/log/br_index.full -c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f /dev/rmt/0m } 2>&1
Full backup completed with warnings on mpcim1 : Thu Dec 1 08:38:45 mal 2005 .
Exit code = 4
8 REPLIES 8
Joseph Loo
Honored Contributor
Solution

Re: SAM -fbackup exit code

ckchai
Frequent Advisor

Re: SAM -fbackup exit code

yes Im on HP-UX 11.00
Tom Ward_1
Honored Contributor

Re: SAM -fbackup exit code

Hello,

I wouldn't be too concerned about the exit codes of 4. That can be caused by using a new tape, or rather writing a new fbackup on a tape. (the tape doesn't have to be new.)

To check if you're running out of tape you can add a line the config file,
/etc/sam/br/fbackup_config in your case, to get a notice of a change tape request. Add a chgvol line with a script that will email you. Even if you're not around to switch tapes you'll at least know that causing problems with your backups.

Regards,
Tom
ckchai
Frequent Advisor

Re: SAM -fbackup exit code

So far I'm ok with the exit code=4.

How about exit code=2? what does it mean?
Joseph Loo
Honored Contributor

Re: SAM -fbackup exit code

hi,

refer to this doc which shows some common causes for exit code 2:

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079312799

regards.
what you do not see does not mean you should not believe
ckchai
Frequent Advisor

Re: SAM -fbackup exit code

Hi,
Thanks got the respond.

Is it conculded that the fbackup will just return exit code 0,1,2,4.

If I suspect the exit code=2 that i encountered is due to "requesting 2nd tape" . Will the system give me a prompt before the backup failed and time out?

Joseph Loo
Honored Contributor

Re: SAM -fbackup exit code

hi,

there should be a warning/prompt, refer to this post:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=733451

regards
what you do not see does not mean you should not believe
Tom Ward_1
Honored Contributor

Re: SAM -fbackup exit code

Hello,

If you're running the backup interactively from SAM you'll be prompted for another tape, but when the backup is scheduled via cron you will not get a prompt.

To check if you're running out of tape you can add a line the config file,
/etc/sam/br/fbackup_config in your case, to get a notice of a change tape request. Add a chgvol line with a script that will email you. Even if you're not around to switch tapes you'll at least know that causing problems with your backups.

Make a simple script to let you know
vi /usr/local/bin/tapechange

Add these lines
#!/usr/bin/ksh
echo "Tape change needed for backup" | \
mailx -s "Backup Alert" your_email_here

Make the script executable.
chmod 555 /usr/local/bin/tapechange

Then add a line to the fbackup configuration file to call then when a tape change is needed.
vi /etc/sam/br/fbackup_config

add this line
chgvol /usr/local/bin/tapechange

It will work, but you have to set it up.

Regards,
Tom