Backup using 'ontape -a' fails within log_full.sh
Posted in 2003
Topics: Backup & Restore, Logging & Checkpoints, Versions, Editions & End-of-Life
Hello,
I have been trying to use log_full.sh to backup our logical logs to
tape. I'm using IDS 9.3 on AIX.
Oncofig has been altered to use the ALARM program log_full.sh, of
which I have included the main parts below.
#-------------------------------------------------------------#
PROG=`basename $0`
USER_LIST=informix
BACKUP_CMD="ontape -a"
EXIT_STATUS=0
EVENT_SEVERITY=$1
EVENT_CLASS=$2
EVENT_MSG="$3"
EVENT_ADD_TEXT="$4"
EVENT_FILE="$5"
case "$EVENT_CLASS" in
23)
$BACKUP_CMD 2>&1 >> /export/home2/stu103/Llog
EXIT_STATUS=$?
;;
*)
;;
esac
exit $EXIT_STATUS
#-------------------------------------------------------------#
This appeared to be working fine, except when I checked the output
of the
BACKUP_CMD the following error was present:
#-------------------------------------------------------------#
Performing automatic backup of logical logs.
Please mount tape 1 on /dev/rmt0 and press Return to continue ...
Do you want to back up the current logical log? (y/n) Logbackup failed
-
Please label this tape as number 1 in the log tape sequence.
This tape contains the following logical logs:
5 - 6
Program over.
#-------------------------------------------------------------#
I assume this is failing becuse it is waiting for a response ? When
I issue 'ontape -a' from the command line there are no errors
returned. The original log_full.sh program sends the output of the
command to /dev/null so I'm wondering whether these is in fact any
errors at all ?
Am I going about this the right way ? If not, I would appreciate
some guidance on how I might make 'log_full.sh' work correctly.
Also, is there any way to check the tape to see if the backup has
been successful or not ?
Thanks in advance,
Andrew.
Does it run from the command line?
It looks like you have a couple of missing returns on the backup
command - something like
$BACKUP_CMD <<-EOF 2>&1 >> /tmp/eric.log
n
EOF
should work
Andrew Johnstone wrote:
>
> Hello,
> I have been trying to use log_full.sh to backup our logical logs to
> tape. I'm using IDS 9.3 on AIX.
>
> Oncofig has been altered to use the ALARM program log_full.sh, of
> which I have included the main parts below.
>
> #-------------------------------------------------------------#
> PROG=`basename $0`
> USER_LIST=informix
> BACKUP_CMD="ontape -a"
> EXIT_STATUS=0
>
> EVENT_SEVERITY=$1
> EVENT_CLASS=$2
> EVENT_MSG="$3"
> EVENT_ADD_TEXT="$4"
> EVENT_FILE="$5"
>
> case "$EVENT_CLASS" in
> 23)
> $BACKUP_CMD 2>&1 >> /export/home2/stu103/Llog
> EXIT_STATUS=$?
> ;;
> *)
> ;;
> esac
>
> exit $EXIT_STATUS
> #-------------------------------------------------------------#
>
> This appeared to be working fine, except when I checked the output
> of the
> BACKUP_CMD the following error was present:
>
> #-------------------------------------------------------------#
> Performing automatic backup of logical logs.
> Please mount tape 1 on /dev/rmt0 and press Return to continue ...
> Do you want to back up the current logical log? (y/n) Logbackup failed
> -
> Please label this tape as number 1 in the log tape sequence.
> This tape contains the following logical logs:
> 5 - 6
> Program over.
> #-------------------------------------------------------------#
>
> I assume this is failing becuse it is waiting for a response ? When
> I issue 'ontape -a' from the command line there are no errors
> returned. The original log_full.sh program sends the output of the
> command to /dev/null so I'm wondering whether these is in fact any
> errors at all ?
>
> Am I going about this the right way ? If not, I would appreciate
> some guidance on how I might make 'log_full.sh' work correctly.
>
> Also, is there any way to check the tape to see if the backup has
> been successful or not ?
>
> Thanks in advance,
>
> Andrew.
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #