Operating System - HP-UX
1837306 Members
3345 Online
110115 Solutions
New Discussion

Re: fbackup executed but exit code not shown

 
SOLVED
Go to solution
Cheng Wee
Advisor

fbackup executed but exit code not shown

hi

as above, from the br_log, we found that the fbackup did run but no exit code shown and the index file oso not written. any idea what is happening and any clue or solution for this.
thks

rgs

cheng wee
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: fbackup executed but exit code not shown

Here is a scripting trick:

fbackup -i/ -f/dev/rmt/0m
rc=$?

if [ $rc -eq 0 ]
then
echo "good run"
else
echo "bad run code $rc"
fi

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cheng Wee
Advisor

Re: fbackup executed but exit code not shown

Hi SEP,

this is what i get from my backup log (br_log) on one of my company server indicating the successful of backup
--
Full backup started on newmfg : Mon Jan 19 01:40:00 EAT 2004 (Scheduled Backup)
{ fbackup -0 -u -g /etc/sam/br/graphFDAa28473 -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 successfully on newmfg : Mon Jan 19 04:16:02 EAT 2004 .
Exit code = 0
--

and this is the server which doesn't seems to complete the backup

--
Full backup started on ges-mfg : Mon Jan 19 03:10:00 EAT 2004 (Scheduled Backup)
{ fbackup -0 -u -g /etc/sam/br/graphZCAa07519 -I /var/sam/log/br_index.full -
c /etc/sam/br/fbackup_config -d /var/adm/fbackupfiles/dates -f /dev/rmt/0m } 2>&1
--

so what is the problem causing the backup log never log any exit code?

rgs

cheng wee


Cheng Wee
Advisor

Re: fbackup executed but exit code not shown

Hi again

is it because the fbackup was hang when it was running, hence the exit code was not reported?

rgs

cheng wee
john korterman
Honored Contributor
Solution

Re: fbackup executed but exit code not shown

Hi Cheng,
the obvious answer is - as you put it yourself - that the backup has never finished. There could be several reasons for that; one that immediately springs to mind is that the session is waiting for a tape change.
You should also check if there are any "old" fbackup sessions on the server. It could be that an "old" fbackup process, or another process, is occupying the tape device, thus blocking the fbackup session. If there are any "old" fbackup sessions hanging, you should kill them only by "kill -15 " as this command frees the memory reserved by the process: fbackup processes have a tendency to occupy rather large amounts of memory, and it is nice to have that freed.

regards,
John K.
it would be nice if you always got a second chance
Cheng Wee
Advisor

Re: fbackup executed but exit code not shown

Hi John,

thks for ur reply, i think we dun need to do tape changing and there are no fbackup old session hanging around because the server is rebooted everynight after the fbackup. so any other probable causes?

rgs

cheng wee
john korterman
Honored Contributor

Re: fbackup executed but exit code not shown

Hi again,
you probably need to investigate what the backup is doing; since you say that the server is booted every night after backup, it gives me the idea that the server is booted before the backup has finished. The boot can then also explain why there are no hanging processes.

regards,
John K.
it would be nice if you always got a second chance
Cheng Wee
Advisor

Re: fbackup executed but exit code not shown

hi john,

thks for ur reply again. i try to see how the things go when we do a manual backup tonight.
update again tomorrow.

rgs

cheng wee
Elmar P. Kolkman
Honored Contributor

Re: fbackup executed but exit code not shown

Before that, you might check your log file: /var/sam/log/br_index.full
And the mail of root if there is no fbackup running. Since SAM's backups are scheduled through cron, output is mailed to the user.

Every problem has at least one solution. Only some solutions are harder to find.
Bill Hassell
Honored Contributor

Re: fbackup executed but exit code not shown

How do you reboot your machine? Through cron too? This sounds like a race condition between fbackup finishing and a scheduled reboot. You may have timed fbackup in the past and then added a few minutes to get the time for a reboot (a very bad idea). fbackup will run as long as it takes to write all the data to the tape and the amount of data on your system is much larger now. Rather than use SAM to run fbackup and 'guess' how long it will take, write a script that runs fbackup followed by the reboot, all in the same script. Now there will be no reboot in the middle of a backup.


Bill Hassell, sysadmin
Cheng Wee
Advisor

Re: fbackup executed but exit code not shown

thks for all the reply,
we had adjusted the schedule of the cron job, so that the reboot is happened much later :)