Informix

My experience with Informix is version 9.2 so all I want to do here is make a note of an oddity I spotted whilst I worked with the product.

The ontape command is the simplest way to back up a whole instance, and if you've got enough space, you can back up to disk instead of tape.  However, when you have to recover from this backup, the server needs to read the backup file twice, so if you create a named pipe from which to restore, you must load the pipe with the dump file twice, so you need two windows (or terminals) connected to the server.  Here's a simplified example with the TAPEDEV defined in the onconfig file to be "backup":

Window 1 Window 2
onmode -yuk  
rm backup  
mknod backup p  
chmod g+w backup  
cat < ifx_level_0_backup > backup  
  ontape -r
  <return>
cat < ifx_level_0_backup > backup  


If you have compressed the backup files, this changes slightly and looks like this:

Window 1 Window 2
onmode -yuk  
rm backup  
mknod backup p  
chmod g+w backup  
gunzip < ifx_level_0_backup.gz > backup  
  ontape -r
  <return>
gunzip < ifx_level_0_backup.gz > backup  


The reason for destroying and re-creating the named pipe is to ensure that the pipe is empty at the start of the process. 


There is another caveat I spotted, if you have multiple instances on a single server, make sure your shell environment is correctly set up before you start a restore.  It's possible to start a restore on the wrong instance! 


  Copyright 2005 Colin MacKellar. All rights reserved.