automating tbtape on Informix V5

automating tbtape on Informix V5

Post by Dana Lloy » Sun, 31 Dec 1899 09:00:00



I'm trying to automate the backup of an Informix
database of around 10 GB to files. All I seem to have
is tbtape (some external reasons involved)

Right now it chokes with an error 32 and
dd: 0511-065 Requested a write of 4096 bytes, but
wrote on 3584.

Anyway, I want to be able to automatically, i.e. not
have to hit enter etc, and be able to redirect each
section of the backup to a different file. So far I
don't see how to do it. Does someone have a modified
version of tbtape or a good wrapper that would allow
me to detect end-of-tape/file so that I can execute a
shell script to point to another file then tell
tbtape to carry on etc?
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dana Lloyd                      (316)663-8657

AIX Solutions Engineer           T/L 762-0002
D*AT AUSTIN
IBM Austin, Texas   USA
AUSVM6(DANAL)

 
 
 

automating tbtape on Informix V5

Post by Clem Aki » Sun, 31 Dec 1899 09:00:00


: I'm trying to automate the backup of an Informix
: database of around 10 GB to files. All I seem to have
: is tbtape (some external reasons involved)

If you are looking for onarchive it is not available in
version 5.  The proper utility is tbtape.

: Right now it chokes with an error 32 and
: dd: 0511-065 Requested a write of 4096 bytes, but
: wrote on 3584.

: Anyway, I want to be able to automatically, i.e. not
: have to hit enter etc, and be able to redirect each
: section of the backup to a different file. So far I
: don't see how to do it. Does someone have a modified
: version of tbtape or a good wrapper that would allow
: me to detect end-of-tape/file so that I can execute a
: shell script to point to another file then tell
: tbtape to carry on etc?

Your best bet is to get a bigger tape drive.  The official
"party line" from Informix is not to support squirrelly
backup solutions.  There are a couple of DLT tape drives which
will support 10GB, or 20GB if you use the on-board compression.
They cost a couple of thousand dollars (cheap.)

The unofficial "personal opinion" is that you don't want to
take chances with your archives.  Automating the process is
easy and pretty safe (though not really supported; see the c.d.i.
archives for several examples) but kludging together several
files, plus the logs, sounds shaky to me.

Be careful,
Clem
        ____________________________________________________________

        |  International Support       formerly                     |

        |  Menlo Park, CA              Standard Disclaimers Apply   |
        |___________________________________________________________|

 
 
 

automating tbtape on Informix V5

Post by Dana Lloy » Sun, 31 Dec 1899 09:00:00


I have the tape drive capacity, 7GB, and a sequential
mode library to boot. I'm told that tbtape only
writes 2.2 GB. Therefore my sequenser doesn't go to
the next tape since the last tape is not full. Tbtape
prompts me to hit enter. Basically, if I can
intercept that request, via shell, I can either
advance to the next tape myself, via tctl or
whatever, or write to files and then deal with them
via a backup manager.

The only squirelly part of the backups I see so far
is tbtape. I tend to think shooting them to files, on
another machine, and then backing them up via a
backup manager to be pretty safe. But then so is
driving 120 MPH, under the right conditions:-).
It gives me tape management and a point and click
method to recover, which I feel good about. Although
I do share/understand what you're saying about
trusting the backup method. I'm not going to
implement it unless I can test/prove it works.

Notwithstanding using files and an external manager,
I still can't automate it going to tape and then
advancing right now.

Having said that though, I only need this solution
for around 6-7 months, until we can get this migrated
to V7.1.2 or 7.2. At that time ontape will/may
support ADSM directly. At least that's what I've been
promised. (They wouldn't fib to me, right?:-|)



> : I'm trying to automate the backup of an Informix
> : database of around 10 GB to files. All I seem to have
> : is tbtape (some external reasons involved)

> If you are looking for onarchive it is not available in
> version 5.  The proper utility is tbtape.

> : Right now it chokes with an error 32 and
> : dd: 0511-065 Requested a write of 4096 bytes, but
> : wrote on 3584.

> : Anyway, I want to be able to automatically, i.e. not
> : have to hit enter etc, and be able to redirect each
> : section of the backup to a different file. So far I
> : don't see how to do it. Does someone have a modified
> : version of tbtape or a good wrapper that would allow
> : me to detect end-of-tape/file so that I can execute a
> : shell script to point to another file then tell
> : tbtape to carry on etc?

> Your best bet is to get a bigger tape drive.  The official
> "party line" from Informix is not to support squirrelly
> backup solutions.  There are a couple of DLT tape drives which
> will support 10GB, or 20GB if you use the on-board compression.
> They cost a couple of thousand dollars (cheap.)

> The unofficial "personal opinion" is that you don't want to
> take chances with your archives.  Automating the process is
> easy and pretty safe (though not really supported; see the c.d.i.
> archives for several examples) but kludging together several
> files, plus the logs, sounds shaky to me.

> Be careful,
> Clem
>         ____________________________________________________________

>         |  International Support       formerly                     |

>         |  Menlo Park, CA              Standard Disclaimers Apply   |
>         |___________________________________________________________|

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dana Lloyd                      (316)663-8657

AIX Solutions Engineer           T/L 762-0002
D*AT AUSTIN
IBM Austin, Texas   USA
AUSVM6(DANAL)
 
 
 

automating tbtape on Informix V5

Post by Clem Aki » Sun, 31 Dec 1899 09:00:00



> I have the tape drive capacity, 7GB, and a sequential
> mode library to boot. I'm told that tbtape only
> writes 2.2 GB.

I've been trying to remember which version does what, and
haven't quite figured out all the internal tools for finding
out--yet, but I think it was in version 5 that tbtape would
not back up more than 2GB if run from tbmonitor, but *would*
if run from the command line.  If you haven't done that yet,
it's worth a try.

Quote:> [...]
> I do share/understand what you're saying about
> trusting the backup method. I'm not going to
> implement it unless I can test/prove it works.

That's my main point.  You'd be surprised at the people who
implement a so-called backup plan without even testing it.
When your job's on the line, you need to test and re-test
your backup procedures, including documentation thorough
enough for someone else in to use in your stead.  Sounds
like you know this, though.  Good...

Quote:> Notwithstanding using files and an external manager,
> I still can't automate it going to tape and then
> advancing right now.

There was a guy doing this a while back.  I don't remember
exactly when and don't have my files on disk here yet.
Check the archives for references on "archive to disk" and
you'll find plenty of tips that should get you on your way.

Quote:> Having said that though, I only need this solution
> for around 6-7 months, until we can get this migrated
> to V7.1.2 or 7.2. At that time ontape will/may
> support ADSM directly. At least that's what I've been
> promised. (They wouldn't fib to me, right?:-|)
> [...original message deleted...]

Sure, that's coming in the *next* release!  (Whatever version
you have, it's ALWAYS not available until the next one.)
(big, obviously tongue-in-cheek grin)

Good luck,
Clem
        ____________________________________________________________

        |  International Support       formerly                     |

        |  Menlo Park, CA              Standard Disclaimers Apply   |
        |___________________________________________________________|

 
 
 

automating tbtape on Informix V5

Post by Dana Lloy » Sun, 31 Dec 1899 09:00:00




> > I have the tape drive capacity, 7GB, and a sequential
> > mode library to boot. I'm told that tbtape only
> > writes 2.2 GB.

> I've been trying to remember which version does what, and
> haven't quite figured out all the internal tools for finding
> out--yet, but I think it was in version 5 that tbtape would
> not back up more than 2GB if run from tbmonitor, but *would*
> if run from the command line.  If you haven't done that yet,
> it's worth a try.

Basically V5, aka tbtape, has a hard stop at 2.2GB. That's just the way
it is according to Informix. Oh well. Now I have to deal with that. I
did get a couple samples from Informix, un-official as all get out and
of course unsupported. However, they may help. If not then it's TCL/TK
or PEARL time. {Niether of which I really know much about}

Quote:> > [...]
> > I do share/understand what you're saying about
> > trusting the backup method. I'm not going to
> > implement it unless I can test/prove it works.

> That's my main point.  You'd be surprised at the people who
> implement a so-called backup plan without even testing it.
> When your job's on the line, you need to test and re-test
> your backup procedures, including documentation thorough
> enough for someone else in to use in your stead.  Sounds
> like you know this, though.  Good...

Amen.

Quote:> > Notwithstanding using files and an external manager,
> > I still can't automate it going to tape and then
> > advancing right now.

> There was a guy doing this a while back.  I don't remember
> exactly when and don't have my files on disk here yet.
> Check the archives for references on "archive to disk" and
> you'll find plenty of tips that should get you on your way.

Actually, I'm kinda surprised that I didn't get flooded with simple
sample scripts. V5 has been around for a very long time. Maybe everyone
has migrated away from it and already recycled those brain cells, or
given them a good burial. I don't like the idea of having someone sit
around at night just to stuff tapes when I have the materials and
technology, minus tbtape of course, to do it.

Quote:> > Having said that though, I only need this solution
> > for around 6-7 months, until we can get this migrated
> > to V7.1.2 or 7.2. At that time ontape will/may
> > support ADSM directly. At least that's what I've been
> > promised. (They wouldn't fib to me, right?:-|)
> > [...original message deleted...]

> Sure, that's coming in the *next* release!  (Whatever version
> you have, it's ALWAYS not available until the next one.)
> (big, obviously tongue-in-cheek grin)

You mean they might be exagerating?!? I'm shocked. NOT!
Thanks though. I'll get this puppy dressed up some how.

> Good luck,
> Clem
>         ____________________________________________________________

>         |  International Support       formerly                     |

>         |  Menlo Park, CA              Standard Disclaimers Apply   |
>         |___________________________________________________________|

--
~~~~~~~~~~~~~~~~~~~~~ Opinions above ~~~~~ Facts Below ~~~~~~~~~~

AIX Solutions Engineer     T/L 762-0002      D*AT AUSTIN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 

automating tbtape on Informix V5

Post by Bill Jaeg » Sun, 31 Dec 1899 09:00:00




>> > I have the tape drive capacity, 7GB, and a sequential
>> > mode library to boot. I'm told that tbtape only
>> > writes 2.2 GB.
>Basically V5, aka tbtape, has a hard stop at 2.2GB. That's just the way
>it is according to Informix. Oh well. Now I have to deal with that. I
>did get a couple samples from Informix, un-official as all get out and
>of course unsupported.

This is strange...I routinely back up a 12+ GB database onto _one_ DLT-2000
compressed tape, using tbtape, and have experienced no problems.  I'm running
Online v5.02UC9 on an RS/6000 under AIX 3.2.5.  I did change the max tape size
parameter in my tbconfig file, but otherwise I'm not doing anything special.
And yes, my backups are of the complete database.  I know, I've restored from
them.  ;)

Hope this helps,
-Bill

 
 
 

automating tbtape on Informix V5

Post by June To » Sun, 31 Dec 1899 09:00:00


: Basically V5, aka tbtape, has a hard stop at 2.2GB. That's just the way
: it is according to Informix.

You have been misinformed.  tbtape has a hard limit of 2TB.  As far as I know
(back to 4.x), tbtape has always had a limit of 2TB.  I think there may have
been a bug regarding ULIMIT (something like not resetting ULIMIT if backing up
to disk), but even these should not affect backup to tape.  The other
limitation on tapesize for archives (besides 2TB) is that some OS flavors will
count up the amount of data written between an open() and a close(), and since
this is basically what tbtape uses, on these OS flavors, this can cause tbtape
to fail at 2GB or 4GB (depending on whether the OS used a signed long or an
unsigned long).

So if you have a 7GB tape (is that where this originally started?  I can't
even find the original question), and you do NOT use one of those unfriendly
OS flavors that cut you off at 2GB or 4GB, you can happily set your TAPESIZE
to 7000000 (kbytes).  (Although, we generally recommend setting it a bit lower
than the advertised size, since tape manufacturers often don't measure very
well...)

If you remember who at Informix told you this, I'd be happy to set them
straight :-}

Maybe this should go in the FAQ.

June

----   June Tong                              Informix Software    ----
----   Senior Consultant                      (415) 926-6140       ----

----       Location-du-jour: Menlo Park                            ----
-
- Please do not send me requests/questions by mail.  When I have the knowledge
- and time permits, I try to answer questions on comp.databases.informix, but
- travel schedule, time, and volume make responding to personal requests
- difficult and often slow.  Please call your local Informix Technical Support
- organization for assistance with technical issues.

 
 
 

automating tbtape on Informix V5

Post by June To » Sun, 31 Dec 1899 09:00:00


Dana Lloyd (da...@austin.ibm.com) wrote:

: Actually, I'm kinda surprised that I didn't get flooded with simple
: sample scripts. V5 has been around for a very long time. Maybe everyone
: has migrated away from it and already recycled those brain cells, or
: given them a good burial. I don't like the idea of having someone sit
: around at night just to stuff tapes when I have the materials and
: technology, minus tbtape of course, to do it.

Oh yeah, just in case you DO have one of those nasty OS's that won't let you
go over 2 or 4GB, here are a couple of programs/scripts I dug up.
Unfortunately, I can't tell if they are exactly what you're looking for, or
maybe they just need to be tailored to your environment, but anyway...

June

----   June Tong                              Informix Software    ----
----   Senior Consultant                      (415) 926-6140       ----
----   International Support                  ju...@informix.com   ----
----       Location-du-jour: Menlo Park                            ----
-
- Please do not send me requests/questions by mail.  When I have the knowledge
- and time permits, I try to answer questions on comp.databases.informix, but
- travel schedule, time, and volume make responding to personal requests
- difficult and often slow.  Please call your local Informix Technical Support
- organization for assistance with technical issues.

=============================================================================

Tech Info Article #3804

Title:   Shell scripts for doing archive through tbmonitor

[NOTE:  The following is known as a "shell archive"  This denotes a special
        way to put ascii files together into a single file and separate
        them out later.  To exract the files in this archive, edit this
        file so that the #!/bin/sh line is the first line of the file, then
        run `sh filename` from the Unix command line.]

QUESTION:

Why can you do an archive through tbmointor and on the command line, but cannot
do one via a script.

ANSWER:

Here's a shell archive containing the code for the shell scripts used
at one of our customer sites to drive tbmonitor for archive/restore.
These scripts are highly tailored to the environment so you'll need
to do some modifications, but it should give you some ideas.

#!/bin/sh
# This is a shell archive (shar 3.10)
# made 10/02/1990 15:34 UTC by mjeske@hh900nr
# Source directory /newres/mjeske/tools
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   4447 -rwxrwxrwx dbarchive
#   3792 -rw-r--r-- dbrestore
#
touch 2>&1 | fgrep '[-amc]' > /tmp/s3_touch$$
if [ -s /tmp/s3_touch$$ ]
then
        TOUCH=can
else
        TOUCH=cannot
fi
rm -f /tmp/s3_touch$$
# ============= dbarchive ==============
sed 's/^X//' << 'SHAR_EOF' > dbarchive &&
X#!/bin/sh
X#      dbarchive: automatic level 0 archive
X#      original author: Carlos Godinez/INFORMIX
X#      @(#)dbarchive   1.3     /usr/informix/backup/sh/s.dbarchive
X# @(#)dbarchive        1.3   /usr/informix/backup/s.dbarchive
X#      last update:8/25/90 @ 11:37:06
X
X#
XTBCONFIG=tbconfig;export TBCONFIG
X
X# Added to insure matching block sizes in "dbarchive" and "dbrestore". MAK
XSIZE=`grep "^TAPEBLK" $INFORMIXDIR/etc/tbconfig|awk '{print $2}'`
Xif [ "${SIZE}" != "972" ];then
Xecho TAPE BLOCK SIZE IS INCORRECT.. PLEASE RESET THE TAPEBLK TO 972
Xexit
Xfi
X
X## Check to see User ID = "informix"
Xif [ "`ucb whoami`" != "informix" ]
Xthen
X       echo "\nUSAGE: $0: Must be executed as User ID = informix\n" >&2
X       exit 1
Xfi
X
X#      test for one parameter and that it is 1, 2, or 3
Xcase "$1" in
X       0) LVL=0;;
X       1) LVL=1;;
X       2) LVL=2
X               echo tmp unavailable
X               exit 99;;
X       *) echo "\nUSAGE: dbarchive [0|1|2]"
X          exit 2;
Xesac
X
X#      check that INFORMIXDIR is set
X: ${INFORMIXDIR:?"INFORMIXDIR is not set"}
X
X# Set PATH just in case
XPATH=$INFORMIX/bin:$PATH; export PATH
X
X# Check for TBCONFIG
X: ${TBCONFIG:?"TBCONFIG is not set"}
XTBCNFG=$INFORMIXDIR/etc/$TBCONFIG; export TBCNFG
X
X# Check that the system is in On-Line or Quiescent mode
XMODE1=`tbstat - | grep "On-Line"`
XMODE2=`tbstat - | grep "Quiescent"`
X[ -z "$MODE1" -a -z "$MODE2" ] && { echo "\nERROR: OnLine is not On-Line or Quiescent mode"; exit 3; }
X
X# Set dummy tape device from tbconfig
XTPLINK=`sed -n '/^TAPEDEV/ s/TAPEDEV//p' $TBCNFG`
X[ -z "$TPLINK" ] && { echo "\nERROR: dummy backup device not set"; exit 4; }
X
X# Set environment variables
XBUDIR=/usr/informix/backup             # Backup directory
XBASETIME=`date +%m%d%R`                        # Time stamp for the in/out files
XTIMESTAMP=`date "+%D %T"`            # Time stamp for the log file
XFILEDEVS=${BUDIR}/level$LVL            # Name of file containing backup devices
X
X# Mark the file with the number of the day_of_the_week
X# This allows seven logs before over-writing
XRUNLOG=${BUDIR}/logs/level${LVL}_`date +%w`
X
X# This file will contain the Start and End times
X#      of the last 100 archives at ${LVL}
XLEVLOG=${BUDIR}/logs/level${LVL}   # GTH
X
X# Check that the file containing device names is readable
X[ ! -r "$FILEDEVS" ] && { echo "\nERROR: cannot read ${FILEDEVS}"; exit 5; }
X
X# Set temporary filenames
XIN=/tmp/in${BASETIME}                  # Feeds keystrokes to tbmonitor
XOUT=/tmp/out${BASETIME}                        # Holds tbmonitor's output
X
X# Set messages expected from tbmonitor
XBCKLVL="'Level $LVL archive is 100 percent completed.'"
XNEXTTAPE="'Please mount next tape and press Return to continue...'"
X
X# Build input shell on the fly
Xcat >$IN <<E-O-F
X#!/bin/sh
X#      input shell
X
X#      read from file and set backup devices
XDEVICES="`cat $FILEDEVS`"
X
X# Set devices to \$1, \$2, \$3, (positional parameters)
Xset \$DEVICES
X
X# Link tape device to first device
XDEV=\$1
Xrm -f $TPLINK 2>/dev/null           # Remove any existing link
Xln \$DEV $TPLINK 2>/dev/null
X
X# Check for the link
X[ "\$?" -ne 0 ] && { echo "\nERROR: link failed"; exit 6; }
X
X# Create the RUNLOG
Xecho \$DEV > $RUNLOG
X
X#      answers to tbtape
Xecho "ac"
Xsleep 10
Xecho "\r"
Xsleep 10
Xecho "$LVL\r"
Xsleep 5
X
X# Continue backup in second device if necessary
X# Move the next argument into \$1, after all, there are more than 9 devices
Xshift
X
X#      test for end of backup
Xgrep -s $BCKLVL $OUT
Xwhile [ "\$?" -ne 0 ]
Xdo
X       sleep 10
X
X       # Test for additional tapes/devices
X       grep -s $NEXTTAPE $OUT
X       if [ "\$?" -eq 0 ]; then
X               # Empty the output file
X               >$OUT
X
X               # Check for another device
X               if [ \$# -gt 0 ]
X               then
X                       # Set next backup device
X                       eval DEV=\$1
X               else
X                       echo "$0: Ran out of archive devices" >&2
X                       exit  7
X               fi
X
X               # Make the link to the next device
X               rm -f $TPLINK
X               ln \$DEV $TPLINK
X               [ "\$?" -ne 0 ] && { echo "\nERROR: link failed"; exit 8; }
X
X               # Keep a record of the device used
X               echo \$DEV >> $RUNLOG
X
X               # Move the next device into \$1
X               shift
X
X               # Send a <RETURN> to tbmonitor
X               echo "\r"
X       fi
X       sleep 10
X       grep -s $BCKLVL $OUT
Xdone
Xecho "\ree"
XE-O-F
X
X# Make the input file executable
Xchmod +x $IN
X
X# Perform archive
Xecho "Archive level $LVL in progress ..."
X$IN | tbmonitor > $OUT 2>/tmp/errlist
X
X# Tell the operator we're done
Xecho "Level $LVL archive is 100 percent completed."
X
X# Keep track of the most current backups
Xecho "BEGIN: ${TIMESTAMP} END: `date "+%D %T"`" >> ${RUNLOG}  
Xtail -1 ${RUNLOG} >> ${LEVLOG}
Xgrep ERROR $OUT >> ${RUNLOG}
Xtail -100 ${LEVLOG} > /tmp/llog$$
Xmv /tmp/llog$$ ${LEVLOG}
X
X# Grab the archive message from tbmonitor
Xgrep "Archive level:" $OUT
X
X# Remove temporary files
X#rm -f $IN $OUT
SHAR_EOF
chmod 0777 dbarchive || echo "restore of dbarchive fails"
if [ $TOUCH = can ]
then
    touch -am 1002103490 dbarchive
fi
# ============= dbrestore ==============
sed 's/^X//' << 'SHAR_EOF' > dbrestore &&
X#!/bin/sh
X#      @(#)dbrestore   1.2     /usr/informix/backup/old.scripts/s.dbrestore
X#      dbrestolog: automatic level 0 archive
X#      original author: Carlos Godinez - Regency Support
X#      Last update: 8/12/90 @ 21:25:57
X
XSIZE=`grep "^TAPEBLK" $INFORMIXDIR/etc/tbconfig|awk '{print $2}'`
Xif [ "${SIZE}" != "972" ];then
Xecho TAPE BLOCK SIZE IS INCORRECT.. PLEASE RESET THE TAPEBLK TO 972
Xexit
Xfi
X
X## Check that User ID is "informix"
Xif [ `ucb whoami` != "informix" ]
Xthen
X       echo "USAGE: $0: Must be executed as User ID = informix" >&2
X       exit 1
Xfi
X
X# Parameter $1 must be 0, 1, or 2
Xcase "$1" in
X       0)      LVL=0
X               ;;
X       1)      LVL=1
X               ;;
X       2)      LVL=2
X               ;;
X       *)      echo "\nUSAGE: dbrestore [0|1|2]"
X               exit 1
X               ;;
Xesac
X
X# Check that INFORMIXDIR is set
X: ${INFORMIXDIR:?"INFORMIXDIR is not set"}
X
X# Set PATH just in case
XPATH=$INFORMIX/bin:$PATH; export PATH
X
X# Check for TBCONFIG
X: ${TBCONFIG:?"TBCONFIG is not set"}
XTBCNFG=$INFORMIXDIR/etc/$TBCONFIG; export TBCNFG
X
X# Check that the system is in On-Line or Quiescent mode
XMODE1=`tbstat - | grep "shared memory not initialized"`
X[ -z "$MODE1" ] && { echo "\nERROR: OnLine is not Off-Line"; exit 1; }
X
X# Get tape device from tbconfig file (Variable TBCNFG)
XTPLINK=`sed -n '/^TAPEDEV/ s/^TAPEDEV//p' $TBCNFG`
X[ -z "$TPLINK" ] && { echo "\nERROR: dummy backup device not set"; exit 1; }
X
X# Set program variables
XBUDIR=/usr/informix/backup;export BUDIR
X#: ${BUDIR:=/usr/informix/backup}
XBASETIME=`date +%m%d`
X
X# Set message variables
XNEXTLEVEL="'Do you have another level of tapes to restore'"
XNEXTTAPE="'Please mount next tape and press Return to continue'"
X
X
X# Set input/output temporary files
XIN=/tmp/in${BASETIME}
XOUT=/tmp/out${BASETIME}
X
X#      build input shell on the fly
Xcat >$IN <<E-O-F
X#!/bin/sh
X# Input script
X
X# Enter Archive/Restore option in tbmonitor
Xecho "ar"
X
XCURLVL=0
Xwhile [ "\$CURLVL" -le ${LVL} ]
Xdo
X       # Set restore devices for archive level
X       FILEDEVS=\${BUDIR}/level\$CURLVL
X       [ ! -f "\$FILEDEVS" ] && { echo "\nERROR: cannot open devices file"; exit 1; }
X
X       # Read list of archive devices from file
X       DEVICES="\`cat \$FILEDEVS\`"
X
X       # Set devices to \$1, \$2, \$3, (positional parameters)
X       set \$DEVICES
X
X       # Link tape device to first disk device
X       DEV=\$1
X       rm -f $TPLINK
X       ln \$DEV $TPLINK
X
X       # Check for
...

read more »

 
 
 

automating tbtape on Informix V5

Post by Cheryl Kendric » Sun, 31 Dec 1899 09:00:00


Please add tbtape info to the FAQ!!!!! If it is in the FAQ, then I must have
overlooked it!

I have not found much info concerning tbtape. The database in question is
my DB. Dana is a in because we (Me and Admin.) have done all we can think
of, so we called the IBM experts (since it is there tape hardware). We
would like to use it with ADSM. Will tbtape (ontape) work with ADSM
on 7.2?

Thanks in advance !!!
 -------------------------------------------------------------------------
 Cheryl Kendricks

                      OR

                      OR

 DTSI, Inc.                      Voice: 1-800-598-5008
 Database Administrator - DOL Job Corps San Marcos, Texas
 ------------------------------------------------------------------------



} : Basically V5, aka tbtape, has a hard stop at 2.2GB. That's just the way
} : it is according to Informix.
}
} You have been misinformed.  tbtape has a hard limit of 2TB.  As far as I know
} (back to 4.x), tbtape has always had a limit of 2TB.  I think there may have
} been a bug regarding ULIMIT (something like not resetting ULIMIT if backing up
} to disk), but even these should not affect backup to tape.  The other
} limitation on tapesize for archives (besides 2TB) is that some OS flavors will
} count up the amount of data written between an open() and a close(), and since
} this is basically what tbtape uses, on these OS flavors, this can cause tbtape
} to fail at 2GB or 4GB (depending on whether the OS used a signed long or an
} unsigned long).
}
} So if you have a 7GB tape (is that where this originally started?  I can't
} even find the original question), and you do NOT use one of those unfriendly
} OS flavors that cut you off at 2GB or 4GB, you can happily set your TAPESIZE
} to 7000000 (kbytes).  (Although, we generally recommend setting it a bit lower
} than the advertised size, since tape manufacturers often don't measure very
} well...)
}
} If you remember who at Informix told you this, I'd be happy to set them
} straight :-}
}
} Maybe this should go in the FAQ.
}
} June
}
} ----   June Tong                              Informix Software    ----
} ----   Senior Consultant                      (415) 926-6140       ----

} ----       Location-du-jour: Menlo Park                            ----
} -
} - Please do not send me requests/questions by mail.  When I have the knowledge
} - and time permits, I try to answer questions on comp.databases.informix, but
} - travel schedule, time, and volume make responding to personal requests
} - difficult and often slow.  Please call your local Informix Technical Support
} - organization for assistance with technical issues.
}

 
 
 

automating tbtape on Informix V5

Post by Dana Lloy » Sun, 31 Dec 1899 09:00:00


Thanks June. Looks like one or more of these should do the trick.
The hard part has been that the tape library is on a remote machine. So
I need to issue commands to that machine then tell tbtape to continue on
it's merry way.

If/when we get this DB converted to V7 then I plan to use ADSM directly.


> Oh yeah, just in case you DO have one of those * OS's that won't let you
> go over 2 or 4GB, here are a couple of programs/scripts I dug up.
> Unfortunately, I can't tell if they are exactly what you're looking for, or
> maybe they just need to be tailored to your environment, but anyway...

> June

<stuff deleted...>
--
~~~~~~~~~~~~~~~~~~~~~ Opinions above ~~~~~ Facts Below ~~~~~~~~~~

AIX Solutions Engineer     T/L 762-0002      D*AT AUSTIN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 

automating tbtape on Informix V5

Post by Santiago Albanes » Sun, 31 Dec 1899 09:00:00


        There is a book from IBM which explains in detail how to
do it with raw devices or cooked files (IBM gg24-4335-00 ) . If
you have raw devices you need to set your tbonfig TAPEDEV var to
point to a file and then back up this file with ADSM or use dd
if=/rawdevice of=backfile .

                                        Chago