Auto Logical Log Backup not working
Posted in 2011
IDS 11.50 on RHEL 5.7: continuous logical log backup via ALARMPROGRAM/alarmprogram.sh with BACKUP_CMD="ontape -a -d" worked when the engine was started manually, but stopped working after a server reboot that started oninit from an /etc/init.d script. No errors appeared in online.log. Suggestions were to check INFORMIXDIR/ONCONFIG match, trigger a log switch with onmode -l, and add -x tracing plus output redirection to the alarm script. The cause was the minimal boot environment: adding PATH and LD_LIBRARY_PATH to the startup script fixed it.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Server Administration, Logging & Checkpoints
Hi to all,
IDS 11.50.FC7IE; RHEL 5.7
I set up IDS to automatically backup my logical logs by doing the following:
1 - onconfig
ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
2 - alarmprogram.sh
BACKUPLOGS=Y
BACKUP_CMD="ontape -a -d"
3 - Bounced the engine
# onmode -k
# oninit
It works as expected. After I reboot the RHEL server, it stops working. oninit
starts OK, it just doesn't automatically backup the logical logs. If I bounce
the engine, the auto backup starts working again. The boot process runs my
script in /etc/init.d/mystartscript which is linked to the appropriate
/etc/rc.d/rc?.d directories. The relevant lines from mystartscript are:
INFORMIXDIR=/usr/informix
INFORMIXSERVER=monty
ONCONFIG=onconfig
export INFORMIXDIR INFORMIXSERVER ONCONFIG
$INFORMIXDIR/bin/oninit
online.log does not show any errors. It does show:
10:00:20 Event alarms enabled. ALARMPROG = '/usr/informix/etc/alarmprogram.sh'
When I reboot or bounce the engine. Does anyone have suggestions on how to fix
this?
Thanks
David
OK, let's get the basics out of the way: When you stop and start the engine
manually, are the settings for INFORMIXDIR and especially ONCONFIG the same
as the settings in the mystartscript file? I suspect that ONCONFIG is set
differently there.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Fri, Aug 12, 2011 at 10:25 AM, DAVID ZINDER <zinder@ztechz.com> wrote:
> Hi to all,
>
> IDS 11.50.FC7IE; RHEL 5.7
>
> I set up IDS to automatically backup my logical logs by doing the
> following:
> 1 - onconfig
>
> ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
> 2 - alarmprogram.sh
>
> BACKUPLOGS=Y
>
> BACKUP_CMD="ontape -a -d"
> 3 - Bounced the engine
>
> # onmode -k>
> # oninit>
> It works as expected. After I reboot the RHEL server, it stops working.
> oninit> starts OK, it just doesn't automatically backup the logical logs. If I
> bounce
> the engine, the auto backup starts working again. The boot process runs my
> script in /etc/init.d/mystartscript which is linked to the appropriate
> /etc/rc.d/rc?.d directories. The relevant lines from mystartscript are:
>
> INFORMIXDIR=/usr/informix
>
> INFORMIXSERVER=monty
>
> ONCONFIG=onconfig
>
> export INFORMIXDIR INFORMIXSERVER ONCONFIG>
> $INFORMIXDIR/bin/oninit
>
> online.log does not show any errors. It does show:
> 10:00:20 Event alarms enabled. ALARMPROG =
> '/usr/informix/etc/alarmprogram.sh'
> When I reboot or bounce the engine. Does anyone have suggestions on how to
> fix
> this?
>
> Thanks
> David
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf307ca1a21b1b9a04aa506ad2
INFORMIXDIR and ONCONFIG are set the same. My "manual" environment has
other variables set, but I don't know if oninit uses any of them. Such as:
DBCENTURY=C
DBEDIT=vi
DBPATH=/dw
INFORMIXTERM=terminfoTERM=xterm
TERMCAP=/usr/informix/etc/termcap
Could it be LD_LIBRARY_PATH, or PATH?
David
On 8/12/2011 11:17 AM, Art Kagel wrote:
> OK, let's get the basics out of the way: When you stop and start the engine
> manually, are the settings for INFORMIXDIR and especially ONCONFIG the same
> as the settings in the mystartscript file? I suspect that ONCONFIG is set
> differently there.
>
> Art
>
> Art S. Kagel
> Advanced DataTools (www.advancedatatools.com)
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions and
> do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
> organization with which I am associated either explicitly, implicitly, or by
> inference. Neither do those opinions reflect those of other individuals
> affiliated with any entity with which I am affiliated nor those of the
> entities themselves.
>
> On Fri, Aug 12, 2011 at 10:25 AM, DAVID ZINDER<zinder@ztechz.com> wrote:
>
>> Hi to all,
>>
>> IDS 11.50.FC7IE; RHEL 5.7
>>
>> I set up IDS to automatically backup my logical logs by doing the
>> following:
>> 1 - onconfig
>>
>> ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
>> 2 - alarmprogram.sh
>>
>> BACKUPLOGS=Y
>>
>> BACKUP_CMD="ontape -a -d"
>> 3 - Bounced the engine
>>
>> # onmode -k>>
>> # oninit>>
>> It works as expected. After I reboot the RHEL server, it stops working.
>> oninit>> starts OK, it just doesn't automatically backup the logical logs. If I
>> bounce
>> the engine, the auto backup starts working again. The boot process runs my
>> script in /etc/init.d/mystartscript which is linked to the appropriate
>> /etc/rc.d/rc?.d directories. The relevant lines from mystartscript are:
>>
>> INFORMIXDIR=/usr/informix
>>
>> INFORMIXSERVER=monty
>>
>> ONCONFIG=onconfig
>>
>> export INFORMIXDIR INFORMIXSERVER ONCONFIG>>
>> $INFORMIXDIR/bin/oninit
>>
>> online.log does not show any errors. It does show:
>> 10:00:20 Event alarms enabled. ALARMPROG =
>> '/usr/informix/etc/alarmprogram.sh'
>> When I reboot or bounce the engine. Does anyone have suggestions on how to
>> fix
>> this?
>>
>> Thanks
>> David
>>
>>
>>
>>
>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
> --20cf307ca1a21b1b9a04aa506ad2
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Hi,
might be a simple problem: the alarm script is only executed when a log
is filled.
You can trigger that with onmode -l
Best regards,
Marcus
-----Original Message-----
From: DAVID ZINDER [mailto:zinder@ztechz.com]
Sent: Friday, August 12, 2011 4:26 PM
To: ids@iiug.org
Subject: Auto Logical Log Backup not working [24623]
Hi to all,
IDS 11.50.FC7IE; RHEL 5.7
I set up IDS to automatically backup my logical logs by doing the
following:
1 - onconfig
ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
2 - alarmprogram.sh
BACKUPLOGS=Y
BACKUP_CMD="ontape -a -d"
3 - Bounced the engine
# onmode -k
# oninit
It works as expected. After I reboot the RHEL server, it stops working.
oninit starts OK, it just doesn't automatically backup the logical logs.
If I bounce the engine, the auto backup starts working again. The boot
process runs my script in /etc/init.d/mystartscript which is linked to
the appropriate /etc/rc.d/rc?.d directories. The relevant lines from
mystartscript are:
INFORMIXDIR=/usr/informix
INFORMIXSERVER=monty
ONCONFIG=onconfig
export INFORMIXDIR INFORMIXSERVER ONCONFIG
$INFORMIXDIR/bin/oninit
online.log does not show any errors. It does show:
10:00:20 Event alarms enabled. ALARMPROG =
'/usr/informix/etc/alarmprogram.sh'
When I reboot or bounce the engine. Does anyone have suggestions on how
to fix this?
Thanks
David
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
After a reboot-startup, when a log completes, does the online log show the
log back up starting at all?
I would modify the alarmprogram.sh so that it runs in expansion mode (add -x
to the #!/usr/bin/bash line at the top) and so that it logs its activity to
a file - just add an open parenthesis near the top of the file and then
closing parenthesis with redirection near the end, so:
#!/usr/bin/bash -x
(
...
) 2>/tmp/alarmprogram.log 1>&2
Then reboot and change logs so you can take a look to see if the script is
running at all and what's failing if it does run but doesn't complete.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Fri, Aug 12, 2011 at 11:32 AM, David Zinder <zinder@ztechz.com> wrote:
> INFORMIXDIR and ONCONFIG are set the same. My "manual" environment has
> other variables set, but I don't know if oninit uses any of them. Such as:
> DBCENTURY=C
> DBEDIT=vi
> DBPATH=/dw
> INFORMIXTERM=terminfo> TERM=xterm
> TERMCAP=/usr/informix/etc/termcap
>
> Could it be LD_LIBRARY_PATH, or PATH?
>
> David
>
> On 8/12/2011 11:17 AM, Art Kagel wrote:
> > OK, let's get the basics out of the way: When you stop and start the
> engine
> > manually, are the settings for INFORMIXDIR and especially ONCONFIG the
> same
> > as the settings in the mystartscript file? I suspect that ONCONFIG is set
> > differently there.
> >
> > Art
> >
> > Art S. Kagel
> > Advanced DataTools (www.advancedatatools.com)
> > Blog: http://informix-myview.blogspot.com/
> >
> > Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> > do not reflect on my employer, Advanced DataTools, the IIUG, nor any
> other
> > organization with which I am associated either explicitly, implicitly, or
> by
> > inference. Neither do those opinions reflect those of other individuals
> > affiliated with any entity with which I am affiliated nor those of the
> > entities themselves.
> >
> > On Fri, Aug 12, 2011 at 10:25 AM, DAVID ZINDER<zinder@ztechz.com> wrote:
> >
> >> Hi to all,
> >>
> >> IDS 11.50.FC7IE; RHEL 5.7
> >>
> >> I set up IDS to automatically backup my logical logs by doing the
> >> following:
> >> 1 - onconfig
> >>
> >> ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
> >> 2 - alarmprogram.sh
> >>
> >> BACKUPLOGS=Y
> >>
> >> BACKUP_CMD="ontape -a -d"
> >> 3 - Bounced the engine
> >>
> >> # onmode -k> >>
> >> # oninit> >>
> >> It works as expected. After I reboot the RHEL server, it stops working.
> >> oninit> >> starts OK, it just doesn't automatically backup the logical logs. If I
> >> bounce
> >> the engine, the auto backup starts working again. The boot process runs
> my
> >> script in /etc/init.d/mystartscript which is linked to the appropriate
> >> /etc/rc.d/rc?.d directories. The relevant lines from mystartscript are:
> >>
> >> INFORMIXDIR=/usr/informix
> >>
> >> INFORMIXSERVER=monty
> >>
> >> ONCONFIG=onconfig
> >>
> >> export INFORMIXDIR INFORMIXSERVER ONCONFIG> >>
> >> $INFORMIXDIR/bin/oninit
> >>
> >> online.log does not show any errors. It does show:
> >> 10:00:20 Event alarms enabled. ALARMPROG =
> >> '/usr/informix/etc/alarmprogram.sh'
> >> When I reboot or bounce the engine. Does anyone have suggestions on how
> to
> >> fix
> >> this?
> >>
> >> Thanks
> >> David
> >>
> >>
> >>
> >>
> >
>
>
*******************************************************************************
> >> Forum Note: Use "Reply" to post a response in the discussion forum.
> >>
> >>
> > --20cf307ca1a21b1b9a04aa506ad2
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec50162817c558704aa50d380
I was using a select into a temp table to fill my logs. I added PATH and
LD_LIBRARY_PATH to mystartscript and that seems to have fixed the
problem. I knew it had to be something simple.
Thanks for the help
David
On 8/12/2011 11:45 AM, Marcus Haarmann wrote:
> Hi,
>
> might be a simple problem: the alarm script is only executed when a log
> is filled.
> You can trigger that with onmode -l
>
> Best regards,
>
> Marcus
>
> -----Original Message-----
> From: DAVID ZINDER [mailto:zinder@ztechz.com]
> Sent: Friday, August 12, 2011 4:26 PM
> To: ids@iiug.org
> Subject: Auto Logical Log Backup not working [24623]
>
> Hi to all,
>
> IDS 11.50.FC7IE; RHEL 5.7
>
> I set up IDS to automatically backup my logical logs by doing the
> following:
> 1 - onconfig
>
> ALARMPROGRAM $INFORMIXDIR/etc/alarmprogram.sh
> 2 - alarmprogram.sh
>
> BACKUPLOGS=Y
>
> BACKUP_CMD="ontape -a -d"
> 3 - Bounced the engine
>
> # onmode -k>
> # oninit>
> It works as expected. After I reboot the RHEL server, it stops working.
> oninit starts OK, it just doesn't automatically backup the logical logs.
> If I bounce the engine, the auto backup starts working again. The boot
> process runs my script in /etc/init.d/mystartscript which is linked to
> the appropriate /etc/rc.d/rc?.d directories. The relevant lines from
> mystartscript are:
>
> INFORMIXDIR=/usr/informix
>
> INFORMIXSERVER=monty
>
> ONCONFIG=onconfig
>
> export INFORMIXDIR INFORMIXSERVER ONCONFIG>
> $INFORMIXDIR/bin/oninit
>
> online.log does not show any errors. It does show:
> 10:00:20 Event alarms enabled. ALARMPROG =
> '/usr/informix/etc/alarmprogram.sh'
> When I reboot or bounce the engine. Does anyone have suggestions on how
> to fix this?
>
> Thanks
> David
>
> ************************************************************************
> *******
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>