backup Informix DB
Jim Avery
jima3a at blueyonder.co.uk
Wed Mar 9 20:46:40 UTC 2005
Gentian Hila wrote:
>Does anybody know any good software, free or for sale that runs on
>RedHat (AS or ES) that backups an Informix DB to a Hard Drive, able to
>backup open files and able to compress the data ?
>
>
For starters, let me say I have experience of Informix 7 and 9 on
various flavours of Unix, but not on Linux. I'm assuming they're
equivalent. Also, the short answer to your question is "no I don't know
anything that will do both" the long answer is that most people muddle
by with the utilities as they are ...
the standard "ontape" utility will back up to the hard drive, and it
will perform the backup while the database is up and running, so I
assume that this is what you mean by being able to back up open files.
Ideally, you want to back up your logical logs /and/ your database
(ontape -a (or ontape -c) and ontape -s). To see a summary of the
syntax of the ontape command, enter:
ontape --
It will not compress (see below).
In order to back up to your hard disk, you will need to configure
Informix so that TAPE and LTAPE point to files on your hard disk (for
example "/mybackup/tape" and "/mybackup/myltape". You will need to make
sure these exist and are writable. Configuration of the paths for this
is in your onconfig file (pointed to by $ONCONFIG and found in
$INFORMIXDIR/etc). An easy way to set these parameters is using the
"onmonitor" utility, but a text editor is just as good :-). Once you've
written your backup to these files, it's then up to you what to do with
them (copy them elsewhere on the network or back them up to
tape/cd/whatever).
The ontape utility is designed to be run from a terminal so you can keep
an eye on how it is doing. It's very much designed with writing to tape
in mind, so it will if necessary prompt you for a new tape. For small
databases, just set a large tape size to prevent it from prompting for a
new tape, otherwise you'll need to handle the interaction somehow and
move/copy the file elsewhere and touch a new one to allow ontape to
write to a new "tape".
There are various ways of scripting the backup to prevent you from
having to enter anything while the backup is running, and the place to
go hunting for solutions is www.iiug.org . I would offer you a
solution, but a) I'm not at work so can't look it up right now and b)
the one I use is a bit pants but if it aint broke and all that.
If you want to compress the data, I guess you could set a small tape
size, and set up a tcl script which will compress each "tape" as it is
written.
I trawled through the iiug archives recently to look for suitable
scripts and didn't find anything which worked terribly well (apologies
to the respective authors). I suspect that most admins feel that
scripting ontape to do what you want is so trivial (or so peculiar to
individual requirements) it's not worth posting how to do it.
There is an Informix utility called "onbar" of which I have no
experience whatsoever.
If you (or anyone else for that matter) has anything else to contribute
or ask about Informix, I suggest you do so in iiug where there are lots
of people far better qualified than me (I'm there too) to answer your
question.
I think I saw mention of version 10 Informix release recently or
imminently, so it might be worth seeing if there are any changes in
version 10 which will help. Please, please I hope there's an easier
backup utility (I haven't looked to see if there is or not yet).
There is quite a lot of documentation on IBM's web site (full set of
manuals to download), but please don't think I'm telling you to RTFM
because the documentation is rather lacking in advice on how to back up
to disk, even though it is possible, supported (afaik), albeit a little
awkward.
by the way, I had to perform my first ever restore (in anger) of an
Informix database last week and it worked fine :-))
Cheers,
Jim
More information about the fedora-list
mailing list