Re: Informix ontape and tape changer
Posted in 1998
In article <6t3g2v$j3l$1@news00.btx.dtag.de>,
triple-p.sst@t-online.de wrote:
> Hi,
> I hope you can provide a solution for our (respectively our client's)
> problem. At first the hard-/software environment:
>
> * Sun Enterprise 3000
> * 4mm tape changer (max. 5 tapes, each max. of 4 GB)
> * Solaris 2.5
> * Informix OnLine 7.24
>
> The backup ceremony :-) is controlled by a script which cpio's the file
> system on the 1st tape, switches to the 2nd tape with a special command,
> and then starts the ontape for backing up the database system.
> Now, the database grew and exceeded the tape size, so ontape prompts
> for a 2nd tape and waits for confirmation - 'til the morning!
>
> How can we convince (more or less elegant) Informix's ontape to switch
> to the 3rd tape in the changer to backup the whole database system in
> one go without waiting for the administrator? Or how do you handle this
> kind of problem? (BTW, we were told that there's is no possibility to
> use compressed device with the hardware mentioned above.)
>
> TIA for your help,
> Stephan.
> --
> Stephan Stresing
>
> Media Systeme
> Gesellschaft fuer Druck & Verlag mbH
> Suedwestpark 48
> D-90449 Nuernberg
> Phone +49 911 6809-113
> Fax +49 911 6809-110
> eMail triple-p.sst@t-online.de
> WWW http://www.mediasys.triple-p.com
>
>
We had a similar problem where we had to use multiple tapes in order to
complete an archive and we didn't want to have to manually send the commands
to advance the tapes. I wrote a tool in Expect to accomplish this task (see
below.) Expect is a TcL-based toolkit that performs interactive command
interpretation. So it will be necessary for you to install Expect but it
will be well worth the effort.
Hope this solves your problem.
Gary D. Cherneski
Sr. DBA/Consultant
(719) 535-3633
garyc@rmi.net
Here is the script:
#!/usr/local/bin/expect-5.22/expect -f
#
# SCRIPT: perform_archive.exp
# WRITTEN BY: Gary D. Cherneski
# DESCRIPTION: This expect script will run the ontape -s -L 0 command and
# respond to the prompts encountered. This assumes that the
# tape juke box is loaded with tapes and ready to run.
set force_conservative 0 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
set timeout -1
spawn ontape -s -L 0
match_max 100000
while 1 {
expect {
eof {break}
"Please mount tape 1 *" {send "\\r"}
"Please mount tape \\[2-4] *" {exec mt -f /dev/rmt/3 rewoffl;\\
sleep 180; send "\\r"}
}
}
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum