I've got an image file of a hard drive from a client that wants a database extracted out of it. The client does not know any details except that the database was once installed on the server from which the image was created.

I found out that it is a UNIX system with a Informix DBS installed, but I am unable to find any database files. I'm not sure about the version of Informix, but it seem that it was installed around 15 years ago.

I'm not able to boot from the image. I'm just viewing the files.

Do informix database files have an extension and what could it be? Any other tips how to identify the database files?


There are many questions here, and let me try to answer them in order of importance to your situation:

  1. Extracting a database from a hard drive image I am assuming you are interested in the actual data, i.e., various tables, its rows, and columns, etc. This is nearly impossible if don't actually have the informix software itself because modern database systems don't store the data in flat files or ASCII format. A single informix instance may have many databases, and each database will have many tables with data, all stored in proprietary a binary format! It is also not uncommon to partition a single table and store it across multiple "files". So, even after you find the relevant files that contain the data, you may not be able to retrieve all the data. The question you should be asking is what is the end goal behind this exercise?

  2. Filename and extension informix databases are stored in binary format inside storage chunk files, known as "spaces" in informix terminology. These files need not have any extension and it is left up to the user (database administrator) to specify the name of the file. So the user may or may not have specified an extension.

  3. Tips for finding the files There are many ways to find the files. You start with identifying the location of the informix software binary/executable files and the configuration files. The informix installation directory is referred to as $INFORMIXDIR in informix parlance. Search the drive for binary files named oninit or onstat. These files should be owned by either user root or informix . These files are located in $INFORMIXDIR/bin. Now we know the location of $INFORMIXDIR. Go to $INFORMIXDIR/etc. This is where the instance configuration file will be located. While the config file does not need to have a specific name or extension, it is typical to keep the file name something similar to onconfig or oncfg. You can also do a grep for ROOTNAME and ROOTPATH inside $INFORMIXDIR/etc to find the config file(s) and the root dbspace: grep -rn 'ROOTNAME\|ROOTPATH' * The root dbspace is the chunk file where the system databases get created and also the default file where the user databases will get created if not explicitly set to some other dbspace. Once you have the config file identified, you can start digging deeper and deeper.


To complete Pradeep's answer: once you find what the $INFORMIXDIR/etc is, there are two files you need: the onconfig and the oncfg files. Do not confuse the two.

The onconfig is the Informix database configuration file. Unfortunately this file can be called anything. Usually it is called onconfig.DBSERVERNAME. In this file you'll find two configurations: DBSERVERNAME (unique name for the instance) and SERVERNUM (unique number for the instance).

The oncfg_*.* file contains information about dbspaces, chunks, and logical-logs that are used by the instance, it is created at the database instance initialization, and it is updated with changes to the dbspaces, chunks and logs in the database. The naming convention for this file is oncfg_DBSERVERNAME.SERVERNUM, and has to follow that naming convention. Doing an ls of all the oncfg_* will give you a potential list of all the instances in the server.

To get the data files (chunks) for the particular instance the oncfg_* file was for, run the following:

grep "^Chunk " $INFORMIXDIR/etc/oncfg_DBSERVERNAME.SERVERNUM | awk '{ print $12 }'

Out of this list, the first file is the ROOTDBS Pradeep mentions above.

To get the configuration file(s) (onconfig files) for the instance(s) running in the server, run:


I hope this helps. ^_^

PS Mind that I don't put a "$" in front of DBSERVERNAME or SERVERNUM as they are not environment variables. They are configuration parameters in the onconfig file. replace them with the actual values from the file. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.