Hands-free onunload
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
We currently backup our databases by using onunload, to unload to a file,
then I just tar the file onto tape. I want to run this by a shell script
but unload requires user interaction. Is there any way to write the script
to bypass this interaction? We are using Informix 7.1 BTW
Thanks,
Daivd Fagan
Why not to use dbexport ?
mkdir /usr/basa
in script
-------------
rm /usr/basa
dbexprot -c basa -o /usr/basa
tar ......
--------
David Fagan <DaveF@CathedralRiver.com> wrote in message
news:cIAF3.100$Y72.4136@news.rdc2.mi.home.com...
>We currently backup our databases by using onunload, to unload to a file,
>then I just tar the file onto tape. I want to run this by a shell script
>but unload requires user interaction. Is there any way to write the script
>to bypass this interaction? We are using Informix 7.1 BTW
>
>Thanks,
>
>Daivd Fagan
>
>
David,
If you want to cheat you can embed "CTRL-J" or "CTRL-M" in
your script, which works in many cases, but often this is
error-prone, and not as reliable in some situations as
others.
Check out "expect", a software package that allows you to
set up send-expect-send-expect keyboard interaction for you.
It is available for most platforms, and is a great way to
automate scripts where a keyboard prompt is required. I've
used it to automate installation scripts and other situations
where I don't want to have to be around for a keyboard
response. I know IBM has it preinstalled on many of their
AIX systems for a variety of uses.
See also http://expect.nist.gov/
Tim
David Fagan wrote:
>
> We currently backup our databases by using onunload, to unload to a file,
> then I just tar the file onto tape. I want to run this by a shell script
> but unload requires user interaction. Is there any way to write the script
> to bypass this interaction? We are using Informix 7.1 BTW
>
> Thanks,
>
> Daivd Fagan
--
.
.-
.--
.---
.---- Tim Schaefer
.----- tschaefe@bellsouth.net
.---- http://www.inxutil.com
.--- http://www.datad.com
.--
.-
.