Abstract
IBM Informix can use STDIO for TAPEDEV when performing backups / restores, which can be utilised to “pipe” backup data across to a target IBM Informix server, obviating the need for an intermediate file on disk. The following shows how this can be used for performing a quick copy of an IBM Informix instance.
Content
Performing a quick source IBM Informix instance backup and target IBM Informix instance restore using STDIO obviating the requirement for an intermediate file.
As informix, create a small, executable script backrest.sh
and run as informix with the relevant environment variables set for the source instance:
Notes:
- informix needs to be a trusted user with the ability to connect without a password prompt (standard ssh security)
- set_target_server_env is a file to set the required environment variables for the target server
- The target server is shutdown first with onmode –ky!
- Make sure your network is capable!
- It is recommended to use the “-F” flag, which prevents the archive information being written to the source IBM Informix instance’s reserved pages – there is no physical backup!
When run, the following information is written to the source online.log:
And the following (extract) is written to the target online.log:
This can be enhanced to use compression inline (an alternative to adding compression inline, is to have the $ONCONFIG variables BACKUP_FILTER to gzip and RESTORE_FILTER to gunzip etc.)
Performing an instantiation of an HDR or RSS IBM Informix Server using STDIO is a simple extension of the above approach.
Below is an example of instantiating an RSS server, again creating a small shell script with the following:
Conclusion
The ability of IBM Informix to use STDIO as a TAPEDEV provides a quick method to instantiate a target IBM Informix instance from a source IBM Informix instance without the requirement for an intermediate disk file, thereby significantly reducing the resources and time required.
Disclaimer
The code fix suggested above is provided “as is” without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement.
Contact us
If you have any questions or would like to find out more about using STDIO for back upas and restores, simply contact us.