Info req "ontape -a backing up of logical logs"
Posted in 2008
Vikas asked whether repeatedly running "ontape -a" with LTAPEDEV set to a single file appends log backups (it doesn't — each run overwrites). Martin pointed him to IDS 11.10's backup-to-directory feature: set LTAPEDEV/TAPEDEV to a directory and ontape writes one uniquely named file per log, which ontape -r/-l (or -d for non-interactive) finds automatically. Art suggested driving ontape -a from ALARMPROGRAM/log_full.sh instead of cron. Vikas's remote restore failed because "host:/path" remote device syntax is not supported for directory backups; the fix is to copy or NFS-mount the files locally, optionally using IFX_ONTAPE_FILE_PREFIX to match the originating host/servernum. A separate case of one log not being backed up by the alarm script was not resolved.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management, Server Administration, Logging & Checkpoints, Platform-Specific Issues
Hello all,
IDS -11.10.FC2W1
Os - solaris 10
we are currently using ontape -c to back up our logical logs on remote tape.
now we are planning to using ontape -a to backup the logs on file system on
the same server.
pls tell me if i set the onconfig as
LTAPEDEV /usr/informix/logicallog/logfile
LTAPESIZE 1000000and run a script (shell script with all env and other parameters set properly)
after every 10 minutes which will do
$INFORMIXDIR/bin/onmode -l
$INFORMIXDIR/bin/ontape -a 1>>$LOG 2>&1 <<!
y
!
Now will ontape APPEND the logical log backup in the
usr/informix/logicallog/logfile after ever 10 minutes or will it over write
the logfile .
If it appends and the logfile now contains logical logs 320 - 520 and now if i
have to restore a level 0 with logical logs saying that
Roll forward should start with log number 501
then in this case can i simply mount the logtape on /usr/informix/logicallog
and will informix start the recovery starting form 501 from the tape which
contains 320 - 520 logs.
Sorry for a basic question but want to be clear about the process.
Also pls let me know if ONBAR is more preffered than ontape for backup &
recovery ( except for the fact that it does parallel bkps of dbspaces and so
is faster then ontape )
In onbar do we have to manually give log tapes to informix as i been doing in
ontape (dont know any other method for ontape).
Thanking you all in advance
Hi,
uhmm, no. It does not work like that.
I understand that you want to do repeated execution of
"ontape -a", but all the log backup data should go to the
same file.
With your onconfig setting, "ontape -a" will write to the
file /usr/informix/logicallog/logfile . But the next execution
of "ontape -a" will prompt for a new tape and after your
<RETURN> it will expect a new tape. Therefore it will
overwrite the file, rather than append to it.
Unfortunately there is no STDIO functionality for logical log
backup. This exists only for dbspace archiving. The (main)
reason is that a log can be backed up only once! So if
such a log backup would go to STDIO and 'gets lost', then
it can't be backed up again and thus is really lost.
But instead, with IDS 11.10 you can use the new functionality
"ontape backup to directory". Instead of specifying a file
name for LTAPEDEV, you specify a directory. With this
"ontape -a" will create a new file in this directory for each
logical log file backed up. It will do so regardless of how
many logical log files are backed up with one execution
of "ontape -a". The file names created will be unique (with
the unique log number as part of the file name), so there is
no danger of overwriting an earlier log backup file. Also,
if a log backup file already exists (because a log is backed
up again after a "Point In Log Restore" inbetween), then
the old file will be renamed (rather than overwritten).
Upon restore "ontape -r" or "ontape -l" will find the
necessary log backup files and restore them. (They need
to be in the directory, though.) This should make the whole
process of backup to and restore from file system much
easier. Still it is recommended to put the backup files
at some point to a more permanent (off-site) storage (e.g.
tapes), just for safety from hardware failure, flood, fire, etc.
ON-Bar is different in that a storage manager (SM) is
responsible for keeping the backup objects. There will be
one backup object in the SM for each logical log backed up.
ON-Bar will keep track of these objects in the internal
database "sysutils" and in a file "ixbar.<servernum>" in
$INFORMIXDIR/etc directory. The latter is necessary for
cold restores when the sysutils database is not on-line.
This information will be used to request and retrieve the
needed logical log backup objects from the SM during
a restore.
Whether you manually have to provide tapes to your SM
depends on the setup and configuration of the SM. If you
have only a single tape drive (or two), then you probably
have to change tapes manually. If you have a tape
library with a roboter, then it will do it, and you don't need
to do it manually.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Entwicklung GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Herbert Kircher
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
ids-bounces@iiug.org wrote on 14.05.2008 12:21:20:
> Hello all,
> IDS -11.10.FC2W1
> Os - solaris 10
>
> we are currently using ontape -c to back up our logical logs on remote
tape.
> now we are planning to using ontape -a to backup the logs on file system
on
> the same server.
>
> pls tell me if i set the onconfig as
> LTAPEDEV /usr/informix/logicallog/logfile
> LTAPESIZE 1000000> and run a script (shell script with all env and other parameters
setproperly)
> after every 10 minutes which will do
>
> $INFORMIXDIR/bin/onmode -l
> $INFORMIXDIR/bin/ontape -a 1>>$LOG 2>&1 <<!
> y
> !
>
> Now will ontape APPEND the logical log backup in the
> usr/informix/logicallog/logfile after ever 10 minutes or will it over
write
> the logfile .
> If it appends and the logfile now contains logical logs 320 - 520
> and now if i
> have to restore a level 0 with logical logs saying that
> Roll forward should start with log number 501
> then in this case can i simply mount the logtape on
/usr/informix/logicallog
> and will informix start the recovery starting form 501 from the tape
which
> contains 320 - 520 logs.
>
> Sorry for a basic question but want to be clear about the process.
>
> Also pls let me know if ONBAR is more preffered than ontape for backup &
> recovery ( except for the fact that it does parallel bkps of dbspaces
and so
> is faster then ontape )
> In onbar do we have to manually give log tapes to informix as i
beendoing in
> ontape (dont know any other method for ontape).
> Thanking you all in advance
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Great !
Thank you Martin !
1.What all parameters needs to be chaned in onconfig
i have set
LTAPEDEV /usr/informix/logicallog/ # where logicallog is a directory
vikas:/export/home/informix> ontape -a
Performing automatic backup of logical logs.
Do you want to back up the current logical log? (y/n) y
File created: /usr/informix/logicallog/vikas_1_Log0000000351
Program over.
it works exactly as you explained.
>Upon restore "ontape -r" or "ontape -l" will find the
>>necessary log backup files and restore them. (They need
>>>to be in the directory, though.)
Please tell me, when i complete the level 0 restoration ,
say "n" to level 1 &
"y" to logical log restoration in that case what will ontape ask me to do
what will it ask me to do ?
will it inform me that "Roll forward should start with log number ###"
will it ask me to mount any tape ( i guess no).
OR will automatically take the required logical logs (present in the
logicallog dir)form the path specified for LTAPEDEV & continue the recovery
processes.
Read Martin's treatment as he covers many points. I just want to add the
following:
Rather than use a cron or shell sleep loop to run ontape -a every 10
minutes, use the built-in ALARMPROGRAM feature to archive the logical logs
with ontape -a as they fill. You can get a sample script and executable
source either of which can be used as is or used as a basis for your own
script or task in my package utils3_ak in the IIUG Software Repository.
Your script will have to rename the log archive file after each archive
(again see my examples), unless, you have IDS 11.10 or later and use the
archvie to directory feature Martin mentioned, as ontape and onbar will
overwrite the file.
On your question about files containing multiple logical logs and restores:
Yes, if you have an archive file containing multiple logical logs and a
restore needs to restore logs beginning with one in the middle of the set of
logs in an archive file, it will work fine.
Art S. Kagel
Oninit
On Wed, May 14, 2008 at 6:21 AM, VIKAS HIVARKAR <vikashivarkar3@gmail.com>
wrote:
> Hello all,
> IDS -11.10.FC2W1
> Os - solaris 10
>
> we are currently using ontape -c to back up our logical logs on remote
> tape.
> now we are planning to using ontape -a to backup the logs on file system on
> the same server.
>
> pls tell me if i set the onconfig as
> LTAPEDEV /usr/informix/logicallog/logfile
> LTAPESIZE 1000000> and run a script (shell script with all env and other parameters set
> properly)
> after every 10 minutes which will do
>
> $INFORMIXDIR/bin/onmode -l
> $INFORMIXDIR/bin/ontape -a 1>>$LOG 2>&1 <<!
> y
> !
>
> Now will ontape APPEND the logical log backup in the
> usr/informix/logicallog/logfile after ever 10 minutes or will it over write
> the logfile .
> If it appends and the logfile now contains logical logs 320 - 520 and now
> if i
> have to restore a level 0 with logical logs saying that
> Roll forward should start with log number 501
> then in this case can i simply mount the logtape on
> /usr/informix/logicallog
> and will informix start the recovery starting form 501 from the tape which
> contains 320 - 520 logs.
>
> Sorry for a basic question but want to be clear about the process.
>
> Also pls let me know if ONBAR is more preffered than ontape for backup &
> recovery ( except for the fact that it does parallel bkps of dbspaces and
> so
> is faster then ontape )
> In onbar do we have to manually give log tapes to informix as i been doing
> in
> ontape (dont know any other method for ontape).
> Thanking you all in advance
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Dear Mr Art/Martin ! I have taken a level 0 on test1 server then did some insertions and backedup the logical logs using the directory feature. LTAPEDEV /usr/informix/logicallog # where logicallog is a directory vikas:/usr/informix/logicallog> ls -ltr total 200064 -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001568 -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001569 -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001570 -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001571 -rw-rw---- 1 informix informix 10518528 May 14 14:35 vikas_2_Log0000001572 -rw-rw---- 1 informix informix 98304 May 14 15:01 vikas_2_Log0000001573 -rw-rw---- 1 informix informix 6914048 May 14 15:23 vikas_2_Log0000001574 -rw-rw---- 1 informix informix 2359296 May 14 15:28 vikas_2_Log0000001575 Then i restored the level 0 on test 2 server where the chunks are exactly as similar to that of test 1 ( i previously have sucessfully restored level 0 and logical logs from test 1 on to test 2). i have set the onconfig for this server specifying the remote paths exactly Continue restore? (y/n)y Do you want to back up the logs? (y/n)n Restore a level 1 archive (y/n) n Do you want to restore log tapes? (y/n)y Roll forward should start with log number 1573 Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to continue ... Bad tape. Do you want to restore another log tape? (y/n)y Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to continue ... Bad tape. Do you want to restore another log tape? (y/n) Pls let me know what am i missing here as tape 1573 (vikas_2_Log0000001573) is present in the directory logicallog. is ther any permissions issue or have i done any thing wrong.
Hi, hmm. You have to decide, whether you want to utilize REMOTE DEVICE or (local) DIRECTORY. But you can't use REMOTE DIRECTORY (at least as far as I know). So I think you will have to (manually) ship the files from machine vikas to the machine where IDS is restored. There put the files into the directory /usr/informix/logicallog and do the restore. This should work. TIA, Martin -- Martin Fuerderer IBM Informix Development Munich, Germany Information Management IBM Deutschland Entwicklung GmbH Chairman of the Supervisory Board: Martin Jetter Board of Management: Herbert Kircher Corporate Seat: Boeblingen, Germany Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294 ids-bounces@iiug.org wrote on 14.05.2008 17:18:59: > Dear Mr Art/Martin ! > > I have taken a level 0 on test1 server then did some insertions and backedup > the logical logs using the directory feature. > LTAPEDEV /usr/informix/logicallog # where logicallog is a directory > > vikas:/usr/informix/logicallog> ls -ltr > total 200064 > -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001568 > -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001569 > -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001570 > -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001571 > -rw-rw---- 1 informix informix 10518528 May 14 14:35 vikas_2_Log0000001572 > -rw-rw---- 1 informix informix 98304 May 14 15:01 vikas_2_Log0000001573 > -rw-rw---- 1 informix informix 6914048 May 14 15:23 vikas_2_Log0000001574 > -rw-rw---- 1 informix informix 2359296 May 14 15:28 vikas_2_Log0000001575 > > Then i restored the level 0 on test 2 server where the chunks are exactly as > similar to that of test 1 ( i previously have sucessfully restored > level 0 and > logical logs from test 1 on to test 2). > > i have set the onconfig for this server specifying the remote paths exactly > > Continue restore? (y/n)y > Do you want to back up the logs? (y/n)n > Restore a level 1 archive (y/n) n > Do you want to restore log tapes? (y/n)y > > Roll forward should start with log number 1573 > > Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to > continue ... > > Bad tape. > Do you want to restore another log tape? (y/n)y > > Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to > continue ... > > Bad tape. > Do you want to restore another log tape? (y/n) > > Pls let me know what am i missing here as tape 1573 > (vikas_2_Log0000001573) is > present in the directory logicallog. > is ther any permissions issue or have i done any thing wrong. > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >
Hi,
using "ontape -l" or "ontape -r" from directory, you will be notified
that ontape will want to start logical log restore with a particular file
(which is expected in the directory specified for LTAPEDEV).
At this time you have the chance to put the file there (if it is not
for whatever reason) before you hit <RETURN>. Then ontape
will restore this log file. It will look for the backups of subsequent
log files and restore them as well if they are present. After restore
of the last log file available, ontape will bring the server to
quiescent mode. It will not ask and wait for more log files.
Alternatively you can specify the option "-d". That will make ontape
to not ask anything. It will just go and restore what is there. Though
it will tell you (informational) what it is/was doing.
If you want ontape to wait for more (newer) log backup files, you
have to split the restore into the physical restore of dbspaces
("ontape -p") followed by continuous logical restore of log files
("ontape -l -C"). The "ontape -l -C" will return the prompt to you
after having restored the last available log backup, but puts
the server into "log restore suspended" state. You can repeat
this as new/more log backups become available. Finally you
do "ontape -l" to conclude the log restore which brings the
server into quiescent mode.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Entwicklung GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Herbert Kircher
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
ids-bounces@iiug.org wrote on 14.05.2008 14:39:22:
> Great !
> Thank you Martin !
>
> 1.What all parameters needs to be chaned in onconfig
>
> i have set
> LTAPEDEV /usr/informix/logicallog/ # where logicallog is a directory
>
> vikas:/export/home/informix> ontape -a
>
> Performing automatic backup of logical logs.
>
> Do you want to back up the current logical log? (y/n) y
> File created: /usr/informix/logicallog/vikas_1_Log0000000351
>
> Program over.
>
> it works exactly as you explained.
>
> >Upon restore "ontape -r" or "ontape -l" will find the
> >>necessary log backup files and restore them. (They need
> >>>to be in the directory, though.)
>
> Please tell me, when i complete the level 0 restoration ,
> say "n" to level 1 &
>
> "y" to logical log restoration in that case what will ontape ask me to
do
>
> what will it ask me to do ?
>
> will it inform me that "Roll forward should start with log number ###"
> will it ask me to mount any tape ( i guess no).
> OR will automatically take the required logical logs (present in the
> logicallog dir)form the path specified for LTAPEDEV & continue the
recovery
> processes.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
On 14/05/2008, VIKAS HIVARKAR <vikashivarkar3@gmail.com> wrote:
> Dear Mr Art/Martin !
>
> I have taken a level 0 on test1 server then did some insertions and backedup
> the logical logs using the directory feature.
> LTAPEDEV /usr/informix/logicallog # where logicallog is a directory
>
> vikas:/usr/informix/logicallog> ls -ltr
> total 200064
> -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001568
> -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001569
> -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001570
> -rw-rw---- 1 informix informix 20578304 May 14 14:35 vikas_2_Log0000001571
> -rw-rw---- 1 informix informix 10518528 May 14 14:35 vikas_2_Log0000001572
> -rw-rw---- 1 informix informix 98304 May 14 15:01 vikas_2_Log0000001573
> -rw-rw---- 1 informix informix 6914048 May 14 15:23 vikas_2_Log0000001574
> -rw-rw---- 1 informix informix 2359296 May 14 15:28 vikas_2_Log0000001575
>
> Then i restored the level 0 on test 2 server where the chunks are exactly as
> similar to that of test 1 ( i previously have sucessfully restored level 0
and
> logical logs from test 1 on to test 2).
>
> i have set the onconfig for this server specifying the remote paths exactly
>
> Continue restore? (y/n)y
> Do you want to back up the logs? (y/n)n
> Restore a level 1 archive (y/n) n
> Do you want to restore log tapes? (y/n)y
>
> Roll forward should start with log number 1573
>
> Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to
> continue ...
>
> Bad tape.
> Do you want to restore another log tape? (y/n)y
>
> Please mount tape 1 on vikas:/usr/informix/logicallog and press Return to
> continue ...
>
> Bad tape.
> Do you want to restore another log tape? (y/n)
>
> Pls let me know what am i missing here as tape 1573 (vikas_2_Log0000001573)
is
> present in the directory logicallog.
> is ther any permissions issue or have i done any thing wrong.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Vikas
Where is the archive held? for ontape restore the archive and the logs
must come from the same location, whether that be a tape drive or a
soft link to a file. In your case you need to have the archive
available from a soft link (say /usr/Informix_restore) and set the
archive device in your onconfig to this. When ontape asks for the log
tape (at the end of the level 0 restore) you need to braek the link to
the arcive and recreate it pointing to the required log file (use a
separate session). Let this log roll forward at which point you will
be prompted for the next tape, again braek the link and recreate to
the next log and continue. Repeat ad-nausium until you reach the end
of the log files.
Alternatively use tapes !! :-)
Keith
Hello,
i tried the logical log backup to directory feature, it works but with a
contrain that the logical log directory should be on the same server where
restoration is initiated.
it did not worked for remote restoration :(
Pls help me with the ALARMPROGRAM setting as i intend to use the directory
feature and ask informix to backup the logical logs to the directory when they
get filled up.
I found the following information form IBM's IDS 11.10 document
Procedure:
Set the LTAPEDEV parameter to a existing directory.
Set the ALARMPROGRAM parameter to the full path for log_full.sh on UNIX® or
log_full.bat on Windows®.
Change the backup program in the ALARMPROGRAM parameter from onbar -b -l to
ontape -a -y.Restart the database server.
both scripts viz alarmprogram.sh & log_full.sh are in $INFORMIXDIR/etc.
which script should be set in onconfig file ,pls guide me with the setting's
Thanking you in advance !
The log_full.sh is the one you want if you just want to use the ALARMPROGRAM
feature for logical log backup (it was primarily added to enable critical
event alerts - ie to send you email when the server has a problem), the
logical log backup was a bonus. You'll have to edit the script as it was
written to use onbar to back up the logs. If you are using ontape, just
change the script to call ontape -a instead of onbar.
Art S. Kagel
Oninit
On Thu, May 15, 2008 at 6:25 AM, VIKAS HIVARKAR <vikashivarkar3@gmail.com>
wrote:
> Hello,
> i tried the logical log backup to directory feature, it works but with a
> contrain that the logical log directory should be on the same server where
> restoration is initiated.
> it did not worked for remote restoration :(
>
> Pls help me with the ALARMPROGRAM setting as i intend to use the directory
> feature and ask informix to backup the logical logs to the directory when
> they
> get filled up.
>
> I found the following information form IBM's IDS 11.10 document
> Procedure:
>
> Set the LTAPEDEV parameter to a existing directory.
> Set the ALARMPROGRAM parameter to the full path for log_full.sh on UNIX(R) or
> log_full.bat on Windows(R).
> Change the backup program in the ALARMPROGRAM parameter from onbar -b -l to
> ontape -a -y.> Restart the database server.
>
> both scripts viz alarmprogram.sh & log_full.sh are in $INFORMIXDIR/etc.
>
> which script should be set in onconfig file ,pls guide me with the
> setting's
>
> Thanking you in advance !
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Dear Mr Kagel !
Thank you for your guidance !
i edited the onconfig file and set
ALARMPROGRAM /opt/informix/ids-11.10.FC2W1/etc/alarmprogram.sh
BACKUPLOGS=Y
then i edited the alramprogram.sh and set
BACKUPLOGS=Y
BACKUP_CMD="ontape -a"
then i bounced the engine and did some activity so that the logical logs fill
up to its limit.
i found that a log tape was generated in /usr/informix/logicallog dir by
informix as i am using the directory feature of IDS 11.10
but after some with all the same settings i again did some insertion so as to
fill the log to its limit , checked for logical log backup & found that the
new file was not there
onstat -laddress number flags uniqid begin size used %used
1e6afe528 7 F------ 0 5:53 10000 0 0.00
1e6afe590 8 F------ 0 5:10053 10000 0 0.00
1e6afe5f8 9 F------ 0 5:20053 10000 0 0.00
1e6afe660 10 U-B---- 1573 5:30053 10000 6 0.06
1e6afe6c8 11 U-B---- 1574 5:40053 10000 3327 33.27
1e6afe730 12 U-B---- 1575 5:50053 10000 1116 11.16
1e6afe798 13 U-B---- 1576 5:60053 10000 10000 100.00
1e6afe800 14 U-----L 1577 5:70053 10000 10000 100.00
1e6afe868 15 U---C-- 1578 5:80053 10000 816 8.16
but surprisingly the log no 1577 is not backed up.
Pls help !
Don't know Vikas. It's working for me in the 11.50 instance on my laptop
(the only instance I have where I'm using alarmprogram.bat/.sh instead of my
own eventalarm.c) just fine. There is a mechanism in there to not permit
the script to handle the same alert again within 5 minutes of the last time
to reduce the email load in the cases of repeating events like lock table
overflows and logs full events. See if there is a file
$DBTEMP/.<servername>.alarm In this file is text tracking the last event
that the script handled.
Art S. Kagel
Oninit
On Thu, May 15, 2008 at 8:11 AM, VIKAS HIVARKAR <vikashivarkar3@gmail.com>
wrote:
> Dear Mr Kagel !
>
> Thank you for your guidance !
>
> i edited the onconfig file and set
> ALARMPROGRAM /opt/informix/ids-11.10.FC2W1/etc/alarmprogram.sh
>
> BACKUPLOGS=Y
>
> then i edited the alramprogram.sh and set
> BACKUPLOGS=Y
>
> BACKUP_CMD="ontape -a"
>
> then i bounced the engine and did some activity so that the logical logs
> fill
> up to its limit.
> i found that a log tape was generated in /usr/informix/logicallog dir by
> informix as i am using the directory feature of IDS 11.10
>
> but after some with all the same settings i again did some insertion so as
> to
> fill the log to its limit , checked for logical log backup & found that the
> new file was not there
> onstat -l> address number flags uniqid begin size used %used
> 1e6afe528 7 F------ 0 5:53 10000 0 0.00
> 1e6afe590 8 F------ 0 5:10053 10000 0 0.00
> 1e6afe5f8 9 F------ 0 5:20053 10000 0 0.00
> 1e6afe660 10 U-B---- 1573 5:30053 10000 6 0.06
> 1e6afe6c8 11 U-B---- 1574 5:40053 10000 3327 33.27
> 1e6afe730 12 U-B---- 1575 5:50053 10000 1116 11.16
> 1e6afe798 13 U-B---- 1576 5:60053 10000 10000 100.00
> 1e6afe800 14 U-----L 1577 5:70053 10000 10000 100.00
> 1e6afe868 15 U---C-- 1578 5:80053 10000 816 8.16
>
> but surprisingly the log no 1577 is not backed up.
> Pls help !
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Hi.
For the backup to directory feature, the incremental archives have the
format <hostname>_<servernum>_LN, where N=3D0|1|2 for level 0, level 1,=
or
level 2 incremental backups. The logfiles have the format
<hostname>_<servernum>_lognnnnnnnnnn, where nnnnnnnnnn is the log file
number.
The <hostname>_<servernum> part of the name can be control by the
environment variable IFX_ONTAPE_FILE_PREFIX.
So if you backup from one instance and want to restore to another insta=
nce,
you can do the following:
1. On instance1 doing the incremental backups and log backups, and it w=
ill
generate the files like
-rw-rw---- 1 informix 8421376 May 16 14:29 kojin_131_L0
-rw-rw---- 1 informix 5210112 May 16 14:28 kojin_131_Log0000000001
-rw-rw---- 1 informix 5210112 May 16 14:28 kojin_131_Log0000000002
-rw-rw---- 1 informix 5210112 May 16 14:28 kojin_131_Log0000000003
2. On instance 2 doing the restore, you will most likely have a differe=
nt
<hostname> and <servernum> where the backup was performed, but you can =
set
IFX_ONTAPE_FILE_PREFIX to kojin_131 so that it will restore the level 0=
backup and logs 1-3 taken from the backup instance. You must also have
TAPEDEV and LTAPEDEV set to that directory where the backup was taken f=
rom.
If this instance is a remote machine, you will need to mount the backup=
directory to be accessible on the restore machine, or copy over the bac=
kup
and logfiles to the local machine.
As to which script to use (alarmprogram.sh or log_full.sh), you should =
be
able to use either one, but change the 'onbar -b -l' to 'ontape -a -d'.=
If
the documentation says to use 'ontape -a -y', it is probably incorrect,=
run
ontape -help and should see '-d' is the one to use.-d non-interactive mode for back up to or restore from a directory
Thanks. Davis.
=
"VIKAS HIVARKAR" =
<vikashivarkar3@g =
mail.com> =
To
Sent by: ids@iiug.org =
ids-bounces@iiug. =
cc
org =
Subj=
ect
Re: Info req "ontape -a backing =
up
05/15/2008 03:25 of logical logs [12122] =
AM =
=
=
Please respond to =
ids@iiug.org =
=
=
Hello,
i tried the logical log backup to directory feature, it works but with =
a
contrain that the logical log directory should be on the same server wh=
ere
restoration is initiated.
it did not worked for remote restoration :(
Pls help me with the ALARMPROGRAM setting as i intend to use the direct=
ory
feature and ask informix to backup the logical logs to the directory wh=
en
they
get filled up.
I found the following information form IBM's IDS 11.10 document
Procedure:
Set the LTAPEDEV parameter to a existing directory.
Set the ALARMPROGRAM parameter to the full path for log_full.sh on UNIX=
=AE or
log_full.bat on Windows=AE.
Change the backup program in the ALARMPROGRAM parameter from onbar -b -=
l to
ontape -a -y.Restart the database server.
both scripts viz alarmprogram.sh & log_full.sh are in $INFORMIXDIR/etc.=
which script should be set in onconfig file ,pls guide me with the
setting's
Thanking you in advance !
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
=
Hello Davis !
thanks you for your response !
vikas:/usr/informix/tapedev> ls -ltr
-rw-rw---- 1 informix informix 18759024640 May 19 11:15 vikas_2_L0
i set the env with "export IFX_ONTAPE_FILE_PREFIX=vikas_2" on instance where
restoration was to be performed (dev).
the onconfig parameters on dev server are set to
TAPEDEV vikas:/usr/informix/tapedev (dir path where level 0 resides on host
vikas)
LTAPEDEV vikas:/usr/informix/logicallog (dir where logicallog resided on host
vikas)
on host dev
onmode -ky
ontape -r (on host dev)
dev:/usr/informix/tapedev> ontape -r
Please mount tape 1 on vikas:/db/informix/tapedev and press Return to continue
...
Physical restore failed - function read archive backup failed code -1 errno 0
Program over.
the restoration does not work with directory feature if the directory to
restore is on remote server.pls let me know if i should try some thing more .
Hi,
as Davis explained to you:
you either need to manually copy (via e,g, rcp or ftp)
the backup/archive files from the production machine
to the development machine.
Or you do an NFS mount of the directory on the
production machine to the development machine.
On the development machine you then set the
TAPEDEV parameter to the directory where you
copied the files to or where you mounted the remote
file system.
Here the excerpt from Davis' e-mail:
> ...
> If this instance is a remote machine, you will need to
> mount the backup directory to be accessible on the
> restore machine, or copy over the backup and
> logfiles to the local machine.
> ...
The notation of a remote tape device (denoted by
"<hostname>:" prepended to the TAPEDEV parameter
in the onconfig file) is NOT SUPPORTED FOR BACKUP TO AND
RESTORE FROM DIRECTORY.
And to be clear:
All the above applies to LTAPEDEV for log backup
and restore in exactly the same way.
(I thought I had told you this already several days ago ...).
Just believe me this one, please.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Entwicklung GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Herbert Kircher
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
ids-bounces@iiug.org wrote on 19.05.2008 12:52:08:
> Hello Davis !
> thanks you for your response !
>
> vikas:/usr/informix/tapedev> ls -ltr
> -rw-rw---- 1 informix informix 18759024640 May 19 11:15 vikas_2_L0
>
> i set the env with "export IFX_ONTAPE_FILE_PREFIX=vikas_2" on instance
where
> restoration was to be performed (dev).
>
> the onconfig parameters on dev server are set to
> TAPEDEV vikas:/usr/informix/tapedev (dir path where level 0 resides on
host
> vikas)
> LTAPEDEV vikas:/usr/informix/logicallog (dir where logicallog resided on
host
> vikas)
>
> on host dev
> onmode -ky
> ontape -r (on host dev)
> dev:/usr/informix/tapedev> ontape -r>
> Please mount tape 1 on vikas:/db/informix/tapedev and press Return
> to continue
> ....
> Physical restore failed - function read archive backup failed code -1
errno 0
>
> Program over.
>
> the restoration does not work with directory feature if the directory to
> restore is on remote server.pls let me know if i should try some thing
more .
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Hello Martin ! Trust me for i believed on your suggesstions and the one Mr Kagel gave to me. there was no second thought to what you said. Davis intorduced a new env variable - IFX_ONTAPE_FILE_PREFIX , i tried it and replied to him. it is just that we will have to use remote server file's to store our backups (no more tape devices will be available)and hence if backup to or restore from remote directory option works then it would really made life easier for us using the directory feature of IDS 11. Your comments/suggessitions are important & respectable. Thanking you ! Regards vikas
Just NFS mount the remote directory and you should be able to use the archive to directory feature as if it were a local filesystem. Art S. Kagel Oninit On Mon, May 19, 2008 at 9:38 AM, VIKAS HIVARKAR <vikashivarkar3@gmail.com> wrote: > Hello Martin ! > > Trust me for i believed on your suggesstions and the one Mr Kagel gave to > me. > there was no second thought to what you said. > > Davis intorduced a new env variable - IFX_ONTAPE_FILE_PREFIX , i tried it > and > replied to him. > > it is just that we will have to use remote server file's to store our > backups > (no more tape devices will be available)and hence if backup to or restore > from > remote directory option works then it would really made life easier for us > using the directory feature of IDS 11. > > Your comments/suggessitions are important & respectable. > > Thanking you ! > Regards > vikas > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >