Loading...

Advanced Configuration - Informix iDataAgent

Table of Contents

Understanding the CommCell Console

The Informix iDataAgent uses the following logical entities to manage backup and restore operations from the CommCell Console.

Agent

Facilitates the Informix instance discovery.

Instance

The Informix Server to be used for the backup and restore operations. Each instance can contain one or more of the databases that you want to back up.

Subclient

Defines the Informix database objects to be backed up.

Informix Configuration

Before you perform backup and restore operations, you must modify parameters in the $INFORMIXDIR/etc/onconfig.<servername> file. For more information, see Informix Configuration

Managing Instances

In the CommCell Console each instance references an Informix database. 

Before You Begin

Verify that you have the following information

  • The name of the instance.
  • The OS User account used for performing all system operations.
  • The path to the Informix home directory.
  • The name of the ONCONFIG file, which helps to administer the number of streams, among other capabilities.
  • The storage Policy used by the default subclient in the instance.
  • The path to the SQLHOSTS file.

Procedure

To add an instance, specify the options available in the Creating New Instance dialog box.

  1. From the CommCell Browser, expand Client Computers > client.
  2. Right-click Informix, point to All Tasks, and then click New Instance.

    The New Instance (INFORMIX SID) dialog box appears.

  3. On the General tab, type the following information:
    • In the INFORMIX SERVER box, type the Instance name.
    • In the INFORMIX USER box, type the user who performs the backup and restore operations.

      For more information, see User Account and Password Management for the Informix iDataAgent.

    • In the INFORMIX DIR box, type the Informix application location.
    • In the ONCONFIG File box, type the name of the ONCONFIG file.

      The software uses this file to administer the number of streams and other capabilities.

    • In the SQLHOSTS File box, type the full path to the SQLHOSTS file.

      Example

      Windows:

      C:\Program Files\IBM\Informix\12.10\etc\sqlhosts.demo_on

      UNIX:

      /opt/IBM/informix/11.50/etc/sqlhosts.demo_on

    • From the Storage Policy used for the data of default subclient box, select a storage policy name.
  4. On the Storage Device tab, do the following.
    • From the Storage Policy used for user command backup of data box, select a storage policy.
    • From the Storage Policy used for all Archive Log backups box, select a storage policy name.
  5. Click OK.

Managing Subclients

When you create an instance, a default subclient is automatically created. The default subclient includes the entire database associated with that instance, which includes all components, such as the log files and control files. However, you can create user-defined subclients to backup the specific components or conditions, such as the following:

  • Whether the entire database will be backed up, or only a subset of objects within the database should be backed up.
  • Whether the archive logs need to be backed up separately

If a new dbspace is added to the database, and if none of the subclients contain that database object , then that object is automatically assigned to the content of the default subclient.

If you are using the native Informix ON-Bar commands to back up and restore data, subclients are not required.

Creating a Subclient

In some environments, it may not be possible to bring down the entire database to perform an offline backup. In such situations, you can choose online backups, where the database will be up and running during the backup. 

You can perform either a full backup or incremental backup of the Informix database when it is online. Since full backups includes all the datafiles, dbspaces and logs, it is very time consuming, hence you can plan for a full online backup less frequently (say, on weekly basis). On the other hand, incremental backups includes the data and logs that have been changed after the last full backup, they are faster and can be performed more frequently (say, on a daily basis).

 If a new database object is added to the database, and if none of the subclients contain that database object , then that object is assigned to the content of the default subclient

Use the following steps to create a subclient for online backups:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Informix.
  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.
  3. On the Creating New Subclient dialog box:
    • On the General tab, enter the Subclient Name.
    • On the Content tab, select Entire Instance Backup.
    • On the Storage Device tab, select the Data Storage Policy.
    • Click OK.

Creating a Subclient to Backup Individual Datafiles and Dbspaces

You can also create subclients to backup specific datafiles and dbspaces, which undergo frequent changes in the Informix database.

Use the following steps to create a subclient to backup individual datafiles and dbspaces:

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Informix.
  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.
  3. On the Creating New Subclient dialog box:
    • On the General tab, enter the Subclient Name.
    • On the Content tab, select Selective and then select the dbspace to backup.
    • On the Storage Device tab, select the Data Storage Policy.
    • Click OK.

Creating a Subclient for Log Backups

Transaction logs are required to recover database transactions that have been lost due to an operating system or disk failure. You can apply these transaction logs to an online backup in order to recover a database.

Though online full backups can include both data and logs, because of their importance in recovering data, it is recommended that you create separate subclients to backup transaction log files.

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Informix.
  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.
  3. On the Creating New Subclient dialog box:
    • Navigate to the General tab, enter the Subclient Name.
    • Navigate to the Content tab, select Full and Current Logical Logs (this option includes completed logs that have not been backed up in addition to the one that is currently being written to).
    • Navigate to the Storage Device tab, select the Data Storage Policy.
    • Click OK.

Creating a Subclient for the Emergency Boot File and the ONCONFIG File

  1. From the CommCell Browser, navigate to Client Computers | <Client>| Informix.
  2. Right-click the <Instance>, point to All Tasks, and then click New Subclient.
  3. On the Creating New Subclient dialog box:
    • On the General tab, enter the Subclient Name.
    • On the Content tab, check the Back up Emergency Boot File (ixbar) and Back up ONCONFIG File checkboxes.
    • On the Storage Device tab, select the Data Storage Policy.
    • Click OK.

Configuring Log Backups

You must configure both TAPEDEV and LTAPEDEV to a value other than the default, /dev/null, for Informix backups and restores to work.

Use the following steps to specify the location to store the logs and perform backups:

  1. Edit the following file :

    #vi $INFORMIXDIR/etc/onconfig

  2. Change the location in TAPEDEV and LTAPEDEV parameters from /dev/null on Unix computers and NUL on Windows computers to any  non-existing directory to which you as an Informix user have full access rights to perform log backups.

    Example:

    For Unix:

    TAPEDEV /dev/null

    LTAPEDEV /dev/null

    Change to:

    TAPEDEV /dev/tmp0

    LTAPEDEV /dev/tmp1

     

    For Windows:

    LTAPEDEV NUL

    Change to:
    LTAPEDEV C:\Program Files\IBM\Informix\tape1

  3. Start a full backup.

Optimizing Log Backups

By default, each on-demand log backup runs a separate job for each request. Each log backup job may take 10-15 seconds (for a log size that is less than or equal to 50 MB) to complete with at least one log file. If you run  on-demand log backups every 2 minutes, use the Informix alarmprogram script to enhance performance.

By default, the time to complete each log backup, based on a 50MB log file, is 10-15 seconds.

You can use additional settings to reduce the time for each log backup, and to configure the timeout for a job that runs in performance mode. By using the additional settings, you can reduce the log backups to run in 3-4 seconds.

Note: Your performance may vary depending on your configuration.

Reducing the Time for Each Log Backup

Use the sPerformanceModeOn additional setting to perform faster log backups. When you set  to Y, the first on-demand log backup completes in a regular time period (10-15 seconds).  Subsequent log backups take less time to run because the first job remains available for the subsequent log backup requests. For example, if the regular backup job takes 12 seconds to complete, the subsequent backups of similar logs complete in 3-4 seconds. The software uses the same first job Id for the subsequent log backup requests, which reduces the time to complete your log backups.

Procedure

  • To the client, add the additional setting as shown in the following table.

    For instructions on how to add additional settings from the CommCell Console, see Add or Modify an Additional Setting.

    Property Value
    Name sPerformanceModeOn
    Category InformixAgent
    Type String
    Value Y

 

See nPERFMODEIFXJOBCLOSEMINS to learn how to complete your log backup job launched under the performance mode.

Configuring the Timeout Interval to Complete a Job Running under the Performance Mode

By default, the on-demand log backup job running under the performance mode will complete after 6 hours. This duration can be customized using the nPERFMODEIFXJOBCLOSEMINS additional setting.

Set the value of nPERFMODEIFXJOBCLOSEMINS additional setting to a positive number indicating the timeout interval in minutes for completing the on-demand log backup job running in performance mode. The current log backup job will be marked completed after the timeout period set with this additional setting and a new job is submitted for the next log backup request. The jobs completed periodically will be eligible for auxiliary copy and other reporting operations.

Configuring the Software to Use a Single Job ID

You can configure the SnapProtect software to start one job for third party command line backup and restore jobs.

If you do not set this additional setting, the number of streams is the BAR_MAX_BACKUP value set in the ONCONFIG file, when the value was greater than 1.

Procedure

  • To the client, add the additional setting as shown in the following table.

    For instructions on how to add additional settings from the CommCell Console, see Add or Modify an Additional Setting.

    Property Value
    Name sSKIPSINGLEJOBID
    Category InformixAgent
    Type String
    Value Y

What to Do Next

On Informix, use the following steps to configure the data streams for backups:

  1. Edit the following file :

    # vi $INFORMIXDIR/etc/onconfig

  2. Set the streams in the BAR_MAX_BACKUP parameter.

    Example:

    BAR_MAX_BACKUP 4

  3. Start a backup (Full or Incremental). The backup is performed using the number of streams specified.

Configuring Environment Variables for Third Party Command Line (ON-Bar) Utility

You must configure and export the following environment variables to perform ON-Bar third-party command line backups for a specific instance on a client where multiple instances are installed:

  • CvInstanceName
  • CvClientName

UNIX Example

where Client1 is the name of the Informix client and Instance001 is the name of the instance.

export CvClientName=Client1
export CvInstanceName=Instance001

Windows Example

where Client1 is the name of the Informix client and Instance001 is the name of the instance.

set CvClientName=Client1
set CvInstanceName=Instance001

When the CommCell Console authenticates third party scripts, run the qlogin command with the token file option (-f) to obtain a token file.  Configure and then export the CvQcmdTokenFile parameter with the token file that the qlogin command generates.

UNIX Example

export CvQcmdTokenFile=/tmp/ccUserToken

Windows Example

set CvQcmdTokenFile=E:\informix\ccUserToken

Configuring Backups and Restores for Informix Extended Parallel Server (XPS) Databases

Informix XPS databases are backed up and restored from third party command line (ON-Bar) utility. In a multi-coserver environment, you can configure the XPS database backups in one of the following modes:

  • Install the iDataAgent on one of the coservers (Primary node) , and configure the instance for this coserver (Primary) from the CommCell. You can use this instance to perform backup and restore operations on all the coservers.
  • Install the iDataAgent on all the coservers which have storage managers, and configure the instance in CommCell Console for one of the coservers. The coserver for which you have configured the instance in CommCell console should be specified in the onbar-worker.

Configuring the Primary Coserver (Primary node):

If the Informix DataAgent is installed on one coserver (primary node), you must configure the storage manager on this primary node. Once you configure the  storage manager, the system will automatically start a single onbar-worker process and perform backups and restores for all coservers from this primary node.  While configuring the storage manager, if you exclude BAR_WORKER_MAX parameter, you must manually start the start_worker.sh file.

Use the following steps to set the ONCONFIG, onbar_worker and storage manager on a primary coserver:

  1. From the command line, go to the $INFORMIXDIR/etc folder.
  2. Open the ONCONFIG file set the global parameters for Log Backup.
    • To have the software perform a backup operation when the log file fills, set the parameter value to CONT
    • To have a user perform a backup operation, set the parameter to CONT
    • To reuse the logs when they fill, set the parameter value to NONE

      Warning: We recommend that you do not set the value to NONE, because the R_PROGRESS_FREQ value will be lost if you restore the IBM Informix-XPS server.

  3. Open the start_worker.sh file, and add the following parameters before the line that starts with $INFORMIXDIR/bin/onbar_w. Then, save the file.
    Parameter Definition
    CvClientName The name of the client defined in the CommCell Console.
    CvInstanceName The name of the SnapProtect installed instance.
    CvPrimaryCluent One of the coservers that runs the Informix database instance. The SnapProtect software associates all jobs with this client.

    export CvInstanceName CvClientName CvPrimaryClientName

  4. Set the following parameters on primary coserver to configure a Single Storage manager in a multi coserver environment:

    # Storage Manager for Coserver1 (ex:dbserver01)

    BAR_SM <id>
    BAR_SM_NAME <name>
    BAR_WORKER_COSVR
    BAR_DBS_COSVR
    BAR_LOG_COSVR
    BAR_WORKER_MAX
    BAR_BSALIB_PATH /Informix_HOME/lib/ibsad001.so
    END

  5. When the CommCell Console authenticates third party scripts, run the qlogin command with the token file option (-f) to obtain a token file.  Configure and then export the CvQcmdTokenFile parameter with the token file that the qlogin command generates.

    Example

    export CvQcmdTokenFile=/tmp/ccUserToken

Configuring All Coservers

When the Informix iDataAgent is installed on all the coservers which have storage managers, note the following.

  • If storage manager dbserver01 uses BAR_SM1 and storage manager dbserver02 uses BAR_SM2, do not reassign the BAR_SM for the dbservers.

Ensure that the SnapProtect library exists on each coserver node where you are performing onbar_worker processes.

Use the following steps to set the ONCONFIG, onbar_worker and storage manager on all coservers:

  1. From the command line, navigate to $INFORMIXDIR/etc folder on each coserver.
  2. Open the ONCONFIG file and set the global parameters for Log Backup.

    For example:

    To set the LOG_BACKUP_MODE to MANUAL, use LOG_BACKUP_MODE MANUAL parameter.

    You can provide one of the following values for this parameter:

    # CONT - backup as soon as the file fills

    # MANUAL - user must perform log backups

    # NONE - don't backup logs and re-use them as soon as they fill.

    Use of NONE is not recommended as data R_PROGRESS_FREQ will be lost if the IBM Informix-XPS server must be restored.

  3. Open the start_worker.sh file, and add these parameters before $INFORMIXDIR/bin/onbar_w and save the file to configure onbar_worker on each coserver.

    CvInstanceName=Instance001  SnapProtect Instance Name Like Instance00x

    CvClientName=dbserver01   #Informix Client Name, this name must be same with CommCell console client name CvPrimaryClientName=dbserve01  

    In SnapProtect, the entire database server (with all its coservers) is represented as a single Informix database instance running on one of the coservers. You can pick any one of the coservers when creating the Informix instance on the CommCell console. Environment information like INFORMIXDIR etc., for that coserver will be entered into the console. This coserver is identified as CvPrimaryClient and all the jobs in SnapProtect will be associated with this client.

    export CvInstanceName CvClientName CvPrimaryClientName

  4. Set the following parameters to configure storage managers on all coservers:

    # Storage Manager for Coserver1 (ex:dbserver01)

    BAR_SM <id>
    BAR_SM_NAME <name>
    BAR_WORKER_COSVR
    BAR_DBS_COSVR
    BAR_LOG_COSVR
    BAR_WORKER_MAX
    BAR_BSALIB_PATH /Informix_HOME/lib/ibsad001.so
    END

    # Storage Manager for Coserver2 (ex:dbserver02)

    BAR_SM <id>
    BAR_SM_NAME <name>
    BAR_WORKER_COSVR
    BAR_DBS_COSVR
    BAR_LOG_COSVR
    BAR_WORKER_MAX
    BAR_BSALIB_PATH /Informix_HOME/lib/ibsad001.so
    END