How to perform an alternate client restore of an Informix instance

How to perform an alternate client restore of an Informix instance

Article: 100010442
Last Published: 2013-10-23
Ratings: 1 0
Product(s): NetBackup


How to perform an alternate client restore of an Informix instance


With NetBackup (tm) for Informix on UNIX one can restore adatabase to a client other than the one that originally performed the backup.Veritas refers to this process as an 'alternate client restore' while Informixrefers to this same process as an 'imported restore.' Below are basicinstructions on how to perform this operation.

NetBackup ServerConfiguration:

To allow alternate client restore in NetBackupDataCenter (tm), the administrator must remove client restrictions in one of twoways:

1. Remove restrictions for alternate client restores for allclients
This can be done by creating the following file on the NetBackupmasterserver:


2.Restrict the restore to / from certain clients
To do this, a file has tobe touched with the name of the certain client (as listed in the bp.conffile). Create the following file on the NetBackup master server:


where"<target_client_name>" is the name of the client that will receive therestore. This will allow this client to restore images from any otherclient.

To restrict the restore further, we can force this client to onlyrestore images from a select set of clients. In this <target_client_name>file, list the names of the source clients. This will restrict the target clientto restore images from only these source clients.

Refer to the NetBackupSystem Administrator's Guide for UNIX for more details.

ExtraInformix Files Needed:

According to the Informix Backup and RestoreGuide,  there are a few files that are needed in addition to the basicinstance data for an imported restore:

1. The onconfig file: The onconfig file contains configuration parameters necessary for theInformix instance. For instance, the onconfig file will point to thelocation of the rootdbs, and number of logical log files for theinstance. The onconfig file of the alternate client should closely matchthe source onconfig file. Please check the Informix Administrator's Guideor the Informix Administrator's Reference for more information.

2. Thesqlhosts file: The sqlhosts file contains connectivity informationfor the Informix instance. The alternate client sqlhosts file shouldclosely match the source sqlhosts file. The $ INFORMIXSQLHOSTSenvironmental variable can be used to relocate the sqlhosts file fromits default location of $INFORMIXDIR/etc/sqlhosts. Please refer to theInformix Administrator's Guide for more information.

3. The ixbarfile: Sometimes referred to as the "emergency boot file," the ixbarfile contains all of the information that pertains to backed-up: dbspaces,blobspaces, and logical logs. This data is needed if a restore is necessarywithout access to the sysutils database (i.e. when the Informix instance isdown). Each time a database object is backed up, this file is updated as well asthe instance catalog tables and the sysutils database. The emergency boot fileresides in the $INFORMIXDIR/etc directory and is called ixbar.<servernum>, where <servernum> is the value of theSERVERNUM onconfig parameter. For instance, if the onconfig parameter SERVERNUMis "21" the emergency boot file name is $INFORMIXDIR/etc/ixbar.21.

In Informix version 8.x products (commonly known as "XPS"), there may beadditional ixbarfiles:

$INFORMIXDIR/etc/bixbar_<servername>.<servernum>is a "backup ixbar"file.
$INFORMIXDIR/etc/rixbar_<servername>.<servernum> isa "restore ixbar" file used during a coldrestore.
$INFORMIXDIR/etc/mixbar_<servername>.<servernum>is a temporary merge ixbar file that exists during a cold restore.

Alsoin Informix version 8.x products, the BAR_BOOT_DIR onconfig variable mayrelocate the emergency boot files from their default $INFORMIXDIR/etclocation.

Please check the Informix Backup and Restore Guide for moreinformation.

4. The oncfg file: The oncfg file contains alist of dbspaces necessary for the full instance. The oncfg file alsoresides in the $INFORMIXDIR/etc directory and is called oncfg_<servername>.<servernum>. For instance, if the onconfigparameters SERVERNAME and SERVERNUM are "mickey" and "21" respectively, the oncfg file will be named $INFORMIXDIR/etc/oncfg_mickey.21.

In Informix version 8.x products(commonly known as "XPS") there is an xcfg as well as an oncfgfile. The format of these files are $INFORMIXDIR/etc/oncfg_<servername>.<servernum>.<coserverid>and $INFORMIXDIR/etc/xcfg_<servername>.<servernum>.<coserverid>respectively. Each coserver will have its own respective coserver oncfgand xcfg files. The xcfg file contains extra information oncoserver locations and dbslice definitions.

Please check theInformix Backup and Restore Guide for more information.

5. Theversions and name of the storage manager: Informix requires that the versionand name of the storage manager be accessible to the Informix instance beforeonbar can start a backup or restore operation. Onbar compares this version withthe XBSA library (supplied by Veritas) to which it connects . If this XBSAlibrary version is compatible with the current version of onbar and is definedin the instance, onbar begins the requested backup or restoreoperation.

In Informix IDS 7.31.UC4 and earlier, the version and name ofthe storage manager must be inserted in the sysutils:bar_version table.The bar_version table can be updated with the dbaccess utility.Please check the Informix Backup and Restore Guide for moreinformation.

In Informix IDS version 7.31.UC5 and later, Informix 8.x(XPS), and Informix 9.x (IDS2000), the sysutils:bar_version table isreplaced with the $INFORMIXDIR/etc/sm_versions file. A default version ofthis file, $INFORMIXDIR/etc/sm_versions.std, is supplied as a template.Please refer to the Informix Backup and Restore Guide for more information onthe sm_version file.

6. External simple-large-objects: Data(TEXT or BYTE) in blobspaces that are stored on optical platters, if used.Please check the Informix Administrator's Guide or the Informix Administrator'sReference for more information.

7. External datablade tables anduser-defined datatypes (Informix version 9.x): If used, these are externalC, Java, or SQL code used with the instance. Please check the InformixAdministrator's Guide or the Informix Administrator's Reference for moreinformation.

8. External tables (Informix version 8.x): These aretables that have not been loaded into the instance, but may be referred to insome SQL code. Please check the Informix Administrator's Guide or the InformixAdministrator's Reference for moreinformation.


The following are steps to run analternate client restore of an Informix database instance. There are certainvariations to these steps which still allow a  successfulrestore.

On the master server:

1. Create the following file on themaster server: /usr/openv/netbackup/db/altnames/No.Restrictions

Onthe source client:

1. Run a level 0 backup( onbar -b -L 0 )
2. Get a listing ofthe dbspaces and chunks ( onstat-d )
3. Note the environmental variables for userinformix  ( env > env.out2>&1 )

On the target client:

1. Make a userInformix with UID and GID > 100
2. Using the environmental variables instep 3 above, set the following on the target user Informix environment: $INFORMIXSERVER, $INFORMIXDIR, $ONCONFIG
3. Make sure that $INFORMIXDIR/bin is listed in the user Informix $PATH environmentalvariable just once
4. Set the environmental variable $INFXBSA_CLIENT =<source_client_name>
5. Install Informix as user root. Refer to theInstallation Guide for Informix Dynamic Server for more information.
6. Usingthe onstat -d from step 2 above, makesure the target instance has the same number and size of dbspaces as the sourceinstance. The chunks must have permissions Informix / Informix 660.Please refer to the Informix Administrator's Guide for more information.
7.Bring the target instance down ( onmode-uky ) if it is not already down
8. Copy the following files fromthe source instance $INFORMIXDIR/etc directory to the target instance: ixbar*, oncfg*, onconfig*, sqlhosts, sm_versions
9. Alter theappropriate ixbar, oncfg, onconfig and sqlhosts as necessary forthe new instance. Refer to the Informix Administrator's Guide for moreinformation.
10. Test the ability to obtain the backup images from thesource instance by using the followingcommand:

/usr/openv/netbackup/bin/bplist -C"<source_CLIENT_NAME>" -t 6 -R /

11. Informix version8.x (XPS) only: start the instance in microkernel mode( xctl -C oninit -m )
12. Physicallyrestore the target instance ( onbar -r-p )
13. Logically restore the target instance( onbar -r -l )
14. Put the targetinstance in multi-user mode ( onmode-m )

Other things to note:

* According to theInformix Migration Guide, restores are only allowed to servers that are runningthe same hardware, operating system, and version of Informix.

* InInformix version 7.2 and 7.3, only user 'root' or user 'informix' can back up orrestore a database instance. In Informix version 8.x and 9.x, members of the"bargroup" UNIX group can also back up and restore Informix instances. Check theInformix Backup and Restore Guide for further information.

* In Informixversion 8.x and 9.x, onbar is a script. In the Informix Backup and RestoreGuide, December 1999 there are instructions on how to edit the onbar script. Itshould be verified if any changes have been made to the source instance onbarscript before attempting an alternate client restore.

* In Informixversion 8.x, the instance must be in microkernel mode( xctl -C oninit -m ) before starting therestore ( onbar -r ).

* Separateonbar commands for a physical restore ( onbar -r-p ) and logical restore ( onbar -r-l ) are done to avoid a logical log salvage on the target instance.If a standard restore command is used ( onbar-r ),  then the logical log salvage on the target instance mayfail the restore. Please refer to the Informix Backup and Restore Guide for moreinformation.

Was this content helpful?