Backing up to a directory with ontape

With Cheetah, IDS now allows a DBA to use ontape to point to adirectory instead of just a particular file. This can be handy when youhave multiple backups that you want to keep in the samedirectory. It involves a little extra administration though, so here’s aquick primer on it.

Setting it up for archivesIt’s actually pretty easy to set IDS up to do it.Here are the steps:

Create your directory: for instance:/opt/Informix/archives/ as Informix (group Informix) (I have the bestluck putting the ending slash on the path.)

chmod 777 the directory

set TAPEDEV in your $ONCONFIG to that directory.

run ontape to create your archive

Setting it up for back upof your logical logs with the log_full.sh $INFORMIXDIR/etc/ALARMPROGRAM

As above, create your directory and set permissions.

save a copy of your $INFORMIXDIR/etc/log_full.sh tolog_full.org or something like that

edit log_full.sh with your favorite editor (i.e. vi oremacs)

Add the –y option to the command (ontape–a –y)

Recycle the engine.

IFX_ONTAPE_FILE_PREFIXWhen you take an archive by default it will use your<HOSTNAME_SERVERNUM> as the standard prefix. For example:my machine name is ryleh and my SERVERNUM=11 When I do an archive andthen look at the file it is this: ryleh_11_L0 If you want to name it something different, you can set theundocumented environmental variable IFX_ONTAPE_FILE_PREFXExample: export IFX_ONTAPE_FILE_PREFIX=playYou will have to recycle the engine after you set it for it to takeeffect.This way you can have multiple archives stored in the same directory.

Conclusion:All in all, backing up to a directory can be a very handy utility tohave for an administrator that has multiple instances, especially forsuch things as development and test instances. You can savean archive under the name of say “benchmark” andthen when you need to load it up, you don’t have to look highand low for the file or the tape. It’s right there,and convenient.