Restore Data - Informix

Topics | How To | Full System Restore | Related Topics


Overview

Restore Considerations for this Agent

Restore Destinations

Renaming Database Spaces

Restoring from a Secondary Copy

Third Party Command Line Restores

Restoring Informix XPS Databases

Verifying Restores


Overview

The following page describes the agent-specific restore options. Additional restore options are accessible from the Related Topics menu.

The Informix iDataAgent supports the following types of restores:

Additionally, the Informix iDataAgent supports:

The Informix Restore Options dialog box that provides the first three options in the previous list also provides an option that allows you to view restore-related information in the time zone that you require.

Log Only option in Informix Restore Options Dialog box, allow you to apply the transaction logs that were backed up on a primary system after a full database backup, to the secondary machine. After a full backup on a primary system, you must perform a cross machine full instance database restore by selecting Physical option and unselecting the Logical option in Informix Restore Options Dialog box. This will recover all committed data and keep Informix database in Fast Recovery state. If you wish to switch over from primary to the secondary machine, perform the Log Only restore job to restore all the collected logs from primary machine to the secondary.

For the Informix iDataAgent, restore operations can be performed from the client and instance levels in the CommCell Browser.

When there is a problem with the Informix database or the client system (operating system, hardware, hard drives, etc.), full system restores may be required. See Restore Data - Informix iDataAgent - Full System Restore for more information.

Back to Top


Restore Considerations for this Agent

Back to Top


Suspend Restore Jobs

Informix iDataAgent restore jobs cannot be suspended unless they are in a pending state.

Top of Section


Restore Sequence when INFORMIX HOME is not on the Shared Disk in a Clustered Environment

If you set up INFORMIX HOME on the local disk for each node in a clustered environment instead of on the shared directory (disk), and if a failover occurs during a backup, an additional restore step is required when (and before) you restore the data to the node to which the failover occurred. For example, suppose that while you are backing up the Informix data from Node 1, a failover to Node 2 occurs. Thereafter, suppose you want to restore the Informix data to Node 2. In such a case, you must first restore the CONFIG files (i.e., ixbar.1 and onconfig) originating from Node 1 to Node 2 before you restore the Informix data.

The additional restore is required under this scenario because the Informix application (including $INFORMIX_DIR/etc) is not shared when you run the backup on Node 1, and the ixbar.1 file on NODE 2 is not updated as the backup completes. This means that the ixbar.1 file on each node now has different contents. However, the contents of the ixbar.1 file on Node 1 are required to complete the restore of the Informix data, therefore necessitating the additional restore discussed in this section.

For information on clustered environments, see Clustering Support.

Top of Section


Restore Destinations

By default, the Informix iDataAgent restores data to the client computer from which it originated; this is referred to as an in-place restore. You can also restore the data to another Client computer in the CommCell. Keep in mind the following considerations when performing such restores:

The following section enumerates the types of restore destinations that are supported by the Informix iDataAgent. See Restore/Recover/Retrieve Destinations - Support for a list of Agents supporting each restore destination type.

In-Place Restore

Out-of-Place Restore

Keep in mind that out-of-place restore operations are also subject to the conditions described in Cross-Platform Restores.

You should restore Informix database data to a different host (or out of place) if the original (source) host is damaged. This is sometimes called a cross-machine restore.

Whenever you perform this type of restore, the source computer and destination computer must have the same operating system, Informix version, Informix User, Informix group, and database dbspace directory structure. In addition, the database server name, database server number, root path and all dbspace physical paths for the destination host must be the same as those for the source host. Also, the destination machine must have sufficient disk space to accommodate the restored database.

See Restore Out-of-Place or Cross-Platform (Informix) for step-by-step directives.

Cross-Platform Restores


Third Party Command Line Restores

In addition to the restores from CommCell Console, you can also use a third party command line utility (On-Bar) to restore Informix databases.

Performing a Cross Platform/Cross Server Restore

You can perform a cross platform/ cross server restores using onbar. However, the source and destination Informix servers must have the same db spaces name and paths. Ensure that the source and destination Informix servers must have the same SERVENUM number in ONCONFIG file. Ensure that the source and destination Informix servers are configured within the same CommServe.

Use the following steps to perform a cross platform/cross server restore:

  1. On the source computer, as an Informix user, type the command at the Command Prompt to note the Informix Dbspaces name and Dbspaces pathname.

    onstat –d

  2. On the destination computer, as an Informix user, type the command at the Command Prompt to note the Informix Dbspaces name and Dbspaces pathname.

    onstat –d

  3. Make sure to include the following information in the source Informix user profile:

    CvInstanceName=<Calypso Instance Name>
    CvClientName=< Source Computer Name as seen on Commcell GUI>
     

    Example: As Informix user

    export CvInstanceName= Instance001
    export CvClientName= test01

  4. Make sure to include the following information in the destination Informix user profile:

    CvInstanceName=<Calypso Instance Name>
    CvClientName=<Destination Computer Name as seen on Commcell GUI>
    INFORMIXSERVER=< Destination Informix Server Name>
     

    Example:

    export CvInstanceName=Instance001
    export CvClientName = test02
    export INFORMIXSERVER = INFSERVER02

  5. Perform a full backup of source Informix server including emergency boot file (ixbar) file and ONCONFIG file
  6. In the destination Informix server, rename the emergency boot file (ixbar) with the destination database server number. You can check parameter (SERVERNUM) in destination Informix server ONCONFIG file. Also rename the oncfg and ONCONFIG files in the destination client.

    Example:

    mv ixbar.0 ixbar.org
    mv oncfg_$servername.$servernum oncfg_$servername.$servernum.org
    mv onconfig.$servername to onconfig.$servername.org

  7. Copy the emergency boot file (ixbar), oncfg and ONCONFIG file manually from source Informix server to destination Informix server in INFORMIXDIR/etc directory.
  8. In the destination Informix server, update the DBSERVERNAME and SERVERNUM parameters with the Destination Informix Server name and number in ONCONFIG file which has been copied from Source Informix server. The DBSERVERNAME name can be different. However, make sure that the SERVERNUM number must be same in the source and destination servers.
  9. Use the following command to stop the destination Informix server

    onmode –yuk

  10. Type the following command to restore the Informix server on the destination computer.

    onbar –r

  11. After a successful Cross Informix Server Restore, delete emergency boot file (ixbar) in Destination Informix server.
  12. Perform a full backup of destination Informix server either using a CommCell Browser or onbar command line utility.

Renaming Database Spaces

Perform the following validations to rename the db spaces during a cold restore using ON–Bar command line utility:

If either of the above steps fail, the renaming process stops and ON–Bar writes an error message to the ON–Bar activity log. Provide the old dbspace location and the new db space location either at the command line or in a file to rename a db space. The following table lists example values for two db spaces:

Element Value for First db space Value for second db space
Old Path /dbspace1_Old /dbspace2_Old
Old offset 0 10000
new path /dbspace1_New /dbspace2_New
new offset 20000  

Renaming Database Spaces with Command Line Options

1. At the Command Prompt, type the following command to rename the chunks. onbar -r -rename -p /dbspace1_Old -o 0 -n /dbspace1_New -o 20000 onbar -r -rename -p /dbspace2_Old -o 0 -n /dbspace2_New -o 20000
2. After a renaming and restoring operation, perform a level-0 backup.  

Renaming Database Spaces with a File

1. At the Command Prompt, type the following command to rename the db spaces by supplying a file named listfile.

ListFile contains the following information: /dbspace1_Old 0 /dbspace1_New 20000 /dbspace2_Old 10000 /dbspace2_New 0

onbar -r -rename -f listfile
2. After a renaming and restoring operation, perform a level-0 backup.  

Renaming Chunks While Specifying Other Options

1. At the Command Prompt, type the following command to rename the db spaces while performing a physical restore on dbspace1 and dbspace2, where rootdbs is the name of the rootdbs.

Alternatively, type the following command to rename the db spaces using file while performing a physical restore on dbspace1 and dbspace2.

onbar -r -rename -p /chunk1 -o 0 -n /chunk1N -o 20000 -p rootdbs dbspace1 dbspace2

onbar -r -rename -f listfile -p rootdbs dbspace1 dbspace2

2. After a renaming and restoring operation, perform a level-0 backup.  

Performing a Cross Platform/Cross Server Restore from CommCell Console

You can perform a cross platform/ cross server restores using CommCell Console. The source and destination Informix servers must have the same db spaces name and paths. Ensure that the source and destination Informix servers must have the same SERVENUM number in ONCONFIG file. Ensure that the source and destination Informix servers are configured within the same CommServe.

Make sure to perform the following while restoring from a source server to a destination server:

Use the following steps to perform a Cross Platform/Cross Server Restore:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Informix iDataAgent.
  2. Right-click the <Instance>, point to All Tasks and then click Browse and Restore.
  3. Click View Content.
  4. From the Browse window, navigate and select the database to be restored and click Recover All Selected.
  5. From the Informix Restore options check box, select the destination Informix server that you want to restore to from the Destination Client list.
  6. Click Entire Instance Restoree.
  7. Select both Physical and Logical check boxes.
  8. Select the Restore Emergency Boot File (ixbar) check box.
  9. Select the Restore ONCONFIG File check box.
  10. Click OK.
 

Restoring from a Secondary Copy

When the Informix database to be restored has been pruned from the primary copy, the data and logs can be restored from a secondary copy that has a different copy precedence. The restores from the secondary copy can be performed in the following methods:

The Data and Log storage policies should be the same at the instance and subclient levels when you restore from a secondary copy.

Performing Partial Restore from Physical and Logical Data

Use the following steps to perform the partial restore from the physical data:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Informix iDataAgent.
  2. Right-click the <Instance>, point to All Tasks and then click Browse Backup Data.
  3. From the Browse window, navigate and select the data to be restored and click Recover All Selected.
  4. From the Informix Restore options check box, click Partial Restore option and select Physical check box.
  5. Select the Database from the Latest database view, and click Advanced.
  1. Click the Copy Precedence tab and select the Restore from Copy Precedence option.
  2. Select the Copy Precedence from the list.
  3. Click OK.

On completion of data only restore, perform a logical restore. Use the following steps to perform the partial restore from the logical data:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Informix iDataAgent.
  2. Right-click the <Instance>, point to All Tasks and then click Browse Backup Data.
  3. From the Browse window, navigate and select the data to be restored and click Recover All Selected.
  4. From the Informix Restore options check box, click Partial Restore option and select Logical check box.
  5. Select the Database from the Latest database view, and click Advanced.
  1. Click the Copy Precedence tab and select the Restore from Copy Precedence option.
  2. Select the Copy Precedence from the list.
  3. Click OK.

Performing Point-In-Time Restore for an Entire Instance

Use the following steps to perform a point-in-time restore for an entire instance:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Informix iDataAgent.
  2. Right-click the <Instance>, point to All Tasks and then click Browse Backup Data.
  3. From the Browse window, navigate and select the data to be restored and click Recover All Selected.
  4. From the Informix Restore options check box, click Entire Instance Restore.
  5. Select both Physical and Logical check boxes.
  6. From the Latest database view, and click New Browse.
  1. From Specify Point-In-Time window, select browse to Point-In-Time check box.
  2. Specify the Date and time to which the backup data from secondary copy needs to be restored.
  3. Select your Time Zone from the list.
  4. Click OK.
  1. From the Informix Restore options check box, click Advanced.
  2. Click the Copy Precedence tab and select the Restore from Copy Precedence option.
  3. Select the Copy Precedence from the list.
  4. Click OK.
  1. Click the Options tab.
  2. Click Up To Logical Log and select the logical log number from the log that is backed up in the browse time from the list. You can view the last log number from ixbar or bar_act.log files.
  3. Click OK.

Restoring the Latest Data from secondary copy using the Log Number

You can restore the latest data also from the secondary copy using the log number to avoid restoring the salvaged logs. Use the following steps to restore the latest data from a secondary copy using the log number:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | Informix iDataAgent.
  2. Right-click the <Instance>, point to All Tasks and then click Browse Backup Data.
  3. From the Browse window, navigate and select the data to be restored and click Recover All Selected.
  4. From the Informix Restore options check box, click Entire Instance Restore.
  5. Select both Physical and Logical check boxes.
  6. Click Advanced.
  1. Click the Copy Precedence tab and select the Restore from Copy Precedence option.
  2. Select the Copy Precedence from the list.
  3. Click OK.
  1. Click the Options tab.
  2. Click Up To Logical Log and select the logical log number from the latest backup log.
  3. Click OK.

Restoring Informix XPS Databases

Informix XPS databases can be restored using a third party command line utility (On-bar). Prior to running restores, you need to configure the Informix XPS database for restores. See Configuring Backups and Restores of Informix XPS Databases for step-by-step instructions.

Offline (Cold) Restores

If a critical dbspace is damaged due to a disk failure or corrupted data, the database server automatically changes to offline mode. If a critical dbspace is damaged, then you must perform an offline (cold) restore for all critical dbspaces.

Use the following steps to perform an offline restore:

1. From the On-Bar command prompt, run the command to switch the Informix XPS instance to Micro Kernel mode xctl onmode -yuk

xctl -C oninit -m

2. Run the restore command. onbar -r
4. After a successful offline restore operation, the database server changes in to quiescent (inactive) mode.

Run the following command to change the database server online

xctl onmode -m

Online (Warm) Restores

Unless your database server has failed, you can restore noncritical storage spaces in a warm restore in the following circumstances:

If the database server goes offline but the critical dbspaces are all right, bring the database server online and perform a warm restore. Use the following steps to perform an online restore:

Run the command to restore the dbspaces onbar -r dbspaceName1 dbspaceName2

Physical Restores

When you perform a physical restore, you can restore the database server without the logs to allow the database server go to fast recovery mode. Once the physical restore is completed, you can restore the logs.

Use the following steps to perform a physical restore and log restore separately:

1. Run the command to perform a physical restore. onbar -r -p
2. Run the command to restore the logs. onbar -l

Restoring the Database to a Specific Point-in-Time

Use the following steps to restore the database to a specific point-in-time:

Run the command to restore the databases to a specific point-in-time onbar -r -t "yyyy-mm-dd hh:mm:ss"

Restoring Individual dbspaces (Partial Restore)

Use the following steps to restore individual dbspaces:

Run the command to perform a partial restore onbar -r dbspaceName1 dbspaceName2

Restoring Logs

Use the following steps to restore the logs:

Run the command to perform logical restore i.e., using log files onbar -r -l

Restoring the Logs to a Specific Point-in-Time

Use the following steps to restore the logs to a specific point-in-time:

Run the command to restore the logs to a specific point-in-time onbar -r -l -t "yyyy-mm-dd hh:mm:ss"

Restoring Informix XPS Databases to a Different Instance/Host

You can restore objects to a different database server instance other than the one from which you have performed a backup. This restore is also known as Imported Restore.

Ensure the following prior to performing a cross machine restore:

  1. Perform a full (level-0) physical backup. Run the following command to perform a full physical backup:

    onbar -b -p

Do not perform an incremental backup prior to performing a cross machine restore.
  1. Perform a current log backup

    xctl onmode -l

    onbar -b -l

  1. Make sure that every chunk (including mirrors) must match exactly in size, location, and offset on the source and target computers to successfully complete the imported restore operation.
  2. Ensure that the source and destination Informix XPS servers must have the same SERVENUM number.

Use the following steps to restore XPS databases to a different instance/host:

1. On the target (destination) Informix server, run the following command to switch the Informix XPS instance to Micro Kernel mode. xctl onmode -yuk

xctl -C oninit -m

2. Configure the target Informix server instance in CommCell browser. See Create an Instance for step-by-step instructions.  
3. Copy the start_worker.sh file from the source computer to the target computer and update it with the target computer information.  
4. Copy the emergency boot (Bixbar) file from the source computer to the target computer and rename it with the target Informix server name.

The emergency boot file needs only the entries from the full (level-0) backup on the source computer.

Example:

cp Bixbar.SourceServerName.CoserverNum to Bixbar.TargetServerName.CoserverNum

5. Copy the oncfg file from the source computer to the target computer and rename it with the target Informix server name. The file name should match the DBSERVERNAME and SERVERNUM on the target computer.

ON–Bar needs the oncfg file to know what dbspaces to retrieve.

Example:

cp oncfg_infserver01.0.1 to oncfg_dbserver01.0.1.

6. Copy the ONCONFIG file from source computer to the target computer and update DBSERVERNAME with the target database name. Example:

cp onconfig.$servername to onconfig.$servername.org

7. Type and run the following command on the target computer to restore the Informix server. onbar –r -p

onbar -r -l

xctl onmode -m

8. After a successful Cross Informix Server Restore, delete the emergency boot file (Bixbar) in the target Informix server.  
9. Perform a full backup of destination Informix server either using a CommCell Browser or on-bar command line utility.  
10. Perform a full backup of source Informix server including emergency boot file (Bixbar) file and ONCONFIG file.  

Verifying Restores

You can verify whether the restore operation is successful or a failure from the ON-bar activity log. The ON–Bar utility writes informational, progress, warning, error, and debugging messages to the ON–Bar activity log. The activity log also records which dbspaces and logical logs were backed up or restored, the progress of the operation, and approximately how long it took for each operation. You can use this information in the activity log to determine whether a backup or restore operation succeeded or failed. ON-Bar Activity Log location can be found in ONCONFIG file and parameter name is BAR_ACT_LOG.

Back to Top