Informix Innovator-C Edition
============================

It is important to make sure you have good backups once you start adding data 
to your database. There are a few different methods of backing up an Informix 
database, the following uses the Informix utility `ontape' which can be used
without shutting the database instance down. Informix stores its data in
the directory $INFORMIXDIR/dbspaces/ol_informix, however just backing up that
directory will not ensure a good backup that can be restored.


STEPS FOR PERFORMING AN EXTERNAL BACKUP
=======================================

1. Set the Informix environment

   . $INFORMIXDIR/ol_informix.sh

2. Create a level 0 backup, which will backup the entire database instance. 

   ontape -s -L 0 -t STDIO > ontape.l0

3. The ontape.l0 archive file can now be backed up as a regular file with
   your normal system backup. Be sure to include the entire $INFORMIXDIR 
   directory in your backup.


STEPS FOR PERFORMING AN EXTERNAL RESTORE
========================================

Important: Use the ontape -S command to save log records that you did not back
up. This will enable you to recover your database server data up to the point
of the failure.

1. If the database server is running, shut it down:

   $ onmode -ky

   Verify the database instance is down:

   $ onstat -
   shared memory not initialized for INFORMIXSERVER 'lnx_ids10tcp'

2. Restore the storage spaces from your external backup utility.

Important: Once the restore is complete, you must ensure that the permissions
on the chunk devices are correct.

   $ cd /opt/informix/dbspaces/ol_informix
   $ tar xvf /backups/archive.tar
   $ chmod 660 /opt/informix/dbspaces/ol_informix/* 
   $ chown informix:informix /opt/informix/dbspaces/ol_informix/* 

3. Perform a physical and logical restore

   $ cat /path/to/ontape.l0 | ontape -r -t STDIO

4. If you have logical logs, restore them using the command ontape -l

5. Bring the server on-line using the command onmode -m

