1833875 Members
1902 Online
110063 Solutions
New Discussion

backup problem

 
Amit Manna_6
Regular Advisor

backup problem

Hi,

In one of the HP-UX servers i am getting the following error.

/opt/system/bin/backup.sh[872]: TAPE_TOTAL[1]: bad number
/opt/system/bin/backup.sh[872]: TAPE_TOTAL[2]: bad number
/opt/system/bin/backup.sh[872]: TAPE_TOTAL[3]: bad number
fbackup exited with Status 4 - Possible causes are new tape or no dates file
~
~
Bue when i check the logs of backup it shows successfull.

The backup script is attached.

Can anybody pls help.


4 REPLIES 4
Eric Antunes
Honored Contributor

Re: backup problem

It seems the script errors at line 872:

while [ ${NUM_LOGS} -gt ${BACKUP_TAPES} ]

Something is wrong here in the context of the script but I'm not a script specialist to tell you what is wrong with this line...
Each and every day is a good day to learn.
Steve Steel
Honored Contributor

Re: backup problem

Hi

2 problems

1)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.
If warnings occur, the operator should verify the
fbackup logs to justify the sanity of the backup taken.


4 can be returned if files were open during backup


2)The script error

put set -x

after line 1 and run it

You see what is happening then


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jeff_Traigle
Honored Contributor

Re: backup problem

Line 784... you're doing a numeric comparison (-le), but you have TAPE_TOTAL[${TAPE_NUM}] as a string by enclosing it in double quotes.
--
Jeff Traigle
Dave La Mar
Honored Contributor

Re: backup problem

This does not set a value to the variable -
echo "BACKUP_TAPES=21"
I do not see where this is actually being set, thus a bad number.

[ ${NUM_LOGS} -lt ${BACKUP_TAPES} ] || {
while [ ${NUM_LOGS} -gt ${BACKUP_TAPES} ]


Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."