Informix back up with Tivoli Storage Manager: Using OnBar and ontape utility

OnBar and ontape utilities are features and effective tools for back-up and restore operations on Informix® databases. Tivoli®Storage Manager (TSM) is also considered an effective storage management application. Proper combination of these facilities will lead to an optimal strategy and a trusted back-up andrestore framework for Informix database administration. The main motivation of this article is to educate and encourage Informix and TSM users to use the combination and enjoy the features. This document has been prepared in assumption that the readers have basic knowledge of Informix and its underlying operating system. Preferably this document can be used as a pocket handbook for Informix database administrators and system administrators.

Share:

Amitava Chakraborty, Informix-Interoperability Team, India Software Lab, IBM

Amitava ChakrabortyAmitava has more than 8 years of experience on the different informix products. Currently as a lead of Informix Interoperability team he owns the responsibility to ensure Informix scalability to other prime products.



Ramesh Gopal Srinivasan (ramesrin@in.ibm.com), Informix-Interoperability Team, India Software Lab, IBM

Ramesh SrinivasanRamesh has vast experience with Java development and he is the key person for customer escalation on JDBC development and also responsible for interoperability activities.



Prasanna Alur Mathada, Informix-Interoperability Team, India Software Lab, IBM

Prasanna MathadaPrasanna is a certified Informix Professional, currently working for the Interoperability team, ISL, India.



15 March 2007

Also available in Russian

This document is organized by the following sections:

  • TSM and Informix OnBar Back-up and Restore Utility
    • Prerequisites
    • Configuration of the TSM server
    • Configuration of the TSM API client
    • Configuration of the TSM administrative command line client (admin client)
    • Environment variable declaration
    • Configure Informix for OnBar
    • Testing of OnBar back-up and Restore on TSM
    • Common issues
  • TSM and Informix ontape Back-up and Restore Utility
    • Prerequisites
    • Configuration of the TSM server
    • Configuration of the TSM BA client
    • Configuration of the TSM admin client
    • Environment variable declaration
    • Configure Informix for ontape
    • Testing of ontape back-up on TSM
    • Limitations
  • Code
    • Code listing (several lines of code in a block)
    • Inline code (code fragment in a sentence)
  • Tables(see the Tables section)
  • References(see the Links section)

TSM and Informix OnBar Back-up and Restore Utility

This section elaborates on configuring and using TSM and Informix for OnBar back-up andrestore utility.

Prerequisites

  • TSM Server should be installed
  • TSM API client should be Installed
  • The TSM admin client should be installed
  • Informix should be installed on the same machine where the TSM API Client is installed
  • One instance of the Informix Server Engine is up and running with a sample database
  • If the Informix version is earlier than IDS 9.50 then Tivoli Data Protector for Informix (TDPI) should be installed over the TSM API client.

Configuration of the TSM Server

  • TSM servers allow you to specify certain configuration options in a server options file named dsmserv.opt. Dsmserv.opt is typically located in the {TSM Server Install Directory}/bin directory on UNIX® and in the {TSM Server Install Directory}\serverinstance (for example, server1) directory on Windows®. Open dsmserv.opt in a text editor and search for the word "COMMTimeout". Uncomment the line if it is commented or add it if it does not exist. Set the value of this option to 600, which is 10 minutes. This means a client will be able to continue the back- up and restore process for a continuous 10 minutes. You might have to increase this value depending upon the size of the database or network speed, or during the backup-restore process if the error "Communication time out" is generated in the administrative console. . But the value 600 is big enough for at least 2GB atabase spaces. You will need to restart the TSM server for the change to take effect.
  • Maintain enough space for the Informix database back up. Please add 500MB space to the default backup storage pool "BACKUPPOOL" using the TSM admin client.
    TSM:TSM>
    define volume Back-upPOOL /usr/tivoli/tsm/server/bin/back-up2.dsm access=readwrite
     formatsize=500
    ANR2017I Administrator SERVER_CONSOLE issued command: DEFINE VOLUME Back-upPOOL
    /usr/tivoli/tsm/server/bin/back-up2.dsm access=readwrite formatsize=500
    ANR0984I Process 2 for DEFINE VOLUME started in the BACKGROUND at 16:49:52.
    ANR2491I Volume Creation Process starting for /usr/tivoli/tsm/server/bin/backu
    p2.dsm, Process Id 2.
    TSM:TSM>
    ANR2206I Volume /usr/tivoli/tsm/server/bin/back-up2.dsm defined in storage pool
    Back-upPOOL (device class DISK).
    ANR1305I Disk volume /usr/tivoli/tsm/server/bin/back-up2.dsm varied online.
    ANR0986I Process 2 for DEFINE VOLUME running in the BACKGROUND processed 1
    items for a total of 524,288,000 bytes with a completion state of SUCCESS at
    16:50:01.
    
    Storage Management Server for AIX-RS/6000 - Version 5, Release 3, Level 2.0
    
    TSM:TSM>
  • Please execute the command "Query STGPOOL" from the TSM admin client to make sure enough space is present in the storage pool. The column "Pct Util" in the output will signify the percentage of utilization of space on a storage pool.
    TSM:TSM>
    Query STGPOOL
    ANR2017I Administrator SERVER_CONSOLE issued command: QUERY STGPOOL
    
    Storage      Device       Estimated    Pct    Pct  High  Low  Next
    Pool Name    Class Name    Capacity   Util   Migr   Mig  Mig  Storage
                                                        Pct  Pct  Pool
    -----------  ----------  ----------  -----  -----  ----  ---  -----------
    ARCHIVEPOOL  DISK             8.0 M    0.0    0.0    90   70
    Back-upPOOL   DISK               1 G    5.1    5.1    90   70
    SPACEMGPOOL  DISK             8.0 M    0.0    0.0    90   70
    
    TSM:TSM>
  • Register the back-up client to the TSM server with the following command: REGISTER NODE <client node name> <password for user admin> domain=STANDARD

    Note: keep this password handy because you will need it when you run the txbsapswd program described below.

    TSM:TSM>
    register node "idcps2" "password" domain=standard
    ANR2017I Administrator SERVER_CONSOLE issued command: REGISTER NODE idcps2
    ?***? domain=standard
    ANR2060I Node IDCPS2 registered in policy domain STANDARD.
    ANR2099I Administrative userid IDCPS2 defined for OWNER access to node IDCPS2.
    TSM:TSM>
    query node
    ANR2017I Administrator SERVER_CONSOLE issued command: QUERY NODE
    
    Node Name                 Platform Policy Domain  Days Since Days Since Locked?
                                       Name                 Last   Password
                                                          Access        Set
    ------------------------- -------- -------------- ---------- ---------- -------
    IDCPS2                    (?)      STANDARD               <1         <1   No
    
    TSM:TSM>

    Now Tivoli Storage Manager Server is ready for the Informix back-up.

Configuration of the TSM API Client

Note: The following description is for UNIX based clients. Please refer to the TSM documentation for details on how to configure the TSM API client on Windows.

Change your current directory to <{tsm client installation directory}/api/bin for 32 bit machines> OR <{tsm client installation directory}/api/bin64 for 64 bit machines > and search for a file named dsm.opt. If dsm.opt is not present,please copy dsm.opt.smp to dsm.opt. Now change the value of the server name in dsm.opt to a TSM server name listed in the dsm.sys file described below

servername <TSM server name>

Now in the same directory, search for a file named dsm.sys. If dsm.sys does not exist, please copy dsm.sys.smp to dsm.sys . Also make sure that the file dsm.sys has the following settings.

SErvername   <TSM server name>
COMMMethod         TCPip <do not change>
TCPPort            1500 <do not change>
TCPServeraddress   <TSM server ip address>
PASSWORDACCESS GENERATE <- add this line if not there.>

Now create a directory named "tsmlog" under /tmp if it is not present. Check the permission of the directory /tmp/tsmlog. The permissions on the directory tsmlog should be 777. Create a file dsierror.log in the same directory and change the file permissions to 777.

Environment variable declaration

Please ensure the following environment variables are set in the same session from where the back-up and Restore will be initiated.

INFORMIXDIR=<Informix Software Installation Directory>
PATH=$INFORMIXDIR/bin:.:/usr/local/bin:/bin:/usr/sbin:$PATH
INFORMIXSERVER=<Informix Server Instance Name> 
ONCONFIG=<Informix Server Configuration File> 
INFORMIXSQLHOSTS=$INFORMIXDIR/etc/<sqlhosts file>
DBSERVERNAME=<$INFORMIXSERVER>
DSMI_DIR=<{tsm client installation directory}/api/bin for 32 bit machines> # 
         <{tsm client installation directory}/api/bin64 for 64 bit machines>
DSMI_LOG=/tmp/tsmlog
DSMI_CONFIG=$DSMI_DIR/dsm.opt #< You may have to copy the dsm.opt.smp to dsm.opt 
(if not exists) >
PATH=$DSMI_DIR:$PATH 
TERMCAP=<Informix Dir>/etc/termcap

NOTE: If TDPI installation is required then consider this variable also in the 
environment:

DSMI_INF_DIR=<{tsm client installation directory}/informix/bin for 32 bit machines>
             <{tsm client installation directory}/informix/bin64 for 64 bit machines>

Configure Informix for OnBar

Next, it is the time to configure Informix for the OnBar-TSM back-up combination.

  • Go to the directory $INFORMIXDIR/etc. Check for the file named as sm_versions. If no such file exists, copy the file named sm_versions.std to sm_versions. Add this line to the file sm_versions: 1|5.2.1|adsm|5| # Explanation:(1| version of TSM client installed|adsm| root version of TSM) Note: In case of TPDI, please use "TDPI client version" instead of "TSM client version".
  • Parameters need to be set in the Informix server configuration(onconfig) file:
    BAR_ACT_LOG     <informix log directory>/bar_act.log # ON-Bar Log file - not in 
    /tmp please
    BAR_DEBUG_LOG   <informix log directory>/bar_dbug.log # ON-Bar Debug Log - not in 
    /tmp please
    BAR_BSALIB_PATH <Informix installation directory>/lib/libtxbsa.<so/sa whichever exists>
    TAPEDEV         <Informix Chunk Path >/tapedev # Create one file with user informix and 
    permission 660
    LTAPEDEV        <Informix Chunk Path >/ltapedev # Create one file with user informix and 
    permission 660
    
    NOTE: If TDPI is installed ,then BAR_BSALIB_PATH will point to :
    
    BAR_BSALIB_PATH <DSMI_INF_DIR>/libTDPinf.<so/sa whichever exists>

    After making these configuration changes, please restart the Informix Server Engine.
  • Now register the Informix Database server as a client to the TSM server.
    1. Go to $INFORMIXDIR/bin.
    2. Run the command txbsapswd as root.
    Enter the password you used in the "register node" command earlier.

    If TDPI is installed, follow the steps below instead of those above:

    1. Go to <DSMI_INF_DIR>
    2. Run the command tdpipswd as root.
    Enter the password you used in the "register node" command earlier.

    A message should appear in the activity log stating that the client has connected to the server and the new password has been accepted by the server. This ensures the connectivity between server and client and its proper registration on the server.

Testing of OnBar back-up and Restore on TSM

Back-up

OnBar -b -L0 #Level 0 back-up

The TSM server activity log will include similar messages to these after the back-up has started.

ANR0406I Session 1 started for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86)
(Tcp/Ip torvalds.lenexa.ibm.com(39115)).
ANR0403I Session 1 ended for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86).
ANR0406I Session 2 started for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86)
(Tcp/Ip torvalds.lenexa.ibm.com(39116)).
ANR0984I Process 2 for MIGRATION started in the BACKGROUND at 04:32:23 AM.
ANR1000I Migration process 2 started for storage pool Back-upPOOL automatically,
highMig=90, lowMig=70, duration=No.
ANR0403I Session 2 ended for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86).
ANR1001I Migration process 2 ended for storage pool Back-upPOOL.
ANR0986I Process 2 for MIGRATION running in the BACKGROUND processed 11 items
for a total of 9,949,184 bytes with a completion state of SUCCESS at 04:32:24
AM.

When the back-up is complete, please open the file named bar_act.log from the Informix log directory. You should find the following entries in the log file.

 2006-08-29 03:50:16 14610  14608 /srv/IDS_SERVER/bin/OnBar_d -b -L0
 2006-08-29 03:50:17 14610  14608 Archive started on rootdbs (Requested Level 0).
 2006-08-29 03:50:18 14610  14608 Begin level 0 back-up rootdbs.
 2006-08-29 03:50:19 14610  14608 Successfully connected to Storage Manager.
 2006-08-29 03:50:20 14610  14608 Completed level 0 back-up rootdbs (Storage Manager 
 copy ID: 0 10241).
 2006-08-29 03:50:21 14610  14608 Archive on rootdbs Completed (Requested Level0).
 2006-08-29 03:50:21 14610  14608 Begin back-up logical log 1.
 2006-08-29 03:50:22 14610  14608 Successfully connected to Storage Manager.
 2006-08-29 03:50:23 14610  14608 Completed back-up logical log 1 (Storage Manager 
 copy ID: 0 10242).
 2006-08-29 03:50:23 14610  14608 Begin back-up logical log 2.
 2006-08-29 03:50:24 14610  14608 Completed back-up logical log 2 (Storage Manager 
 copy ID: 0 10243).
 2006-08-29 03:50:24 14610  14608 Begin back-up logical log 3.
 2006-08-29 03:50:24 14610  14608 Completed back-up logical log 3 (Storage Manager 
 copy ID: 0 10244).
 2006-08-29 03:50:24 14610  14608 Begin back-up logical log 4.
 2006-08-29 03:50:25 14610  14608 Completed back-up logical log 4 (Storage Manager 
 copy ID: 0 10245).
 2006-08-29 03:50:25 14610  14608 Begin back-up logical log 5.
 2006-08-29 03:50:25 14610  14608 Completed back-up logical log 5 (Storage Manager 
 copy ID: 0 10246).
 2006-08-29 03:50:26 14610  14608 /srv/IDS_SERVER/bin/OnBar_d complete, returning 0 (0x00)

If you find any error in the log file, please try to resolve the issue with the help of Common issues section of this document. If the issue is not addressed there, please contact one of us through e-mail for the further help.

Restore

You should bring down the Informix server using the command onmode -ky before initiating the restoration process. After bringing down the database server successfully, please issue the command onbar -r to start the OnBar restoration process. The TSM server activity log will include messages similar to the following after the restore starts.

The TSM server activity log will include messages similar to these after the restore has started.

ANR0406I Session 3 started for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86)
(Tcp/Ip torvalds.lenexa.ibm.com(39119)).
ANR0403I Session 3 ended for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86).
ANR0406I Session 4 started for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86)
(Tcp/Ip torvalds.lenexa.ibm.com(39120)).
ANR0403I Session 4 ended for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86).
ANR0406I Session 5 started for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86)
(Tcp/Ip torvalds.lenexa.ibm.com(39123)).
ANR0403I Session 5 ended for node TORVALDS.LENEXA.IBM.COM (IITSM LINUX86).

After the restore completes, please open the file named bar_act.log from the Informix log directory. These are the entries you should find in the log file:

2006-08-29 03:56:53 15223  15221 /srv/IDS_SERVER/bin/OnBar_d -r
2006-08-29 03:56:54 15223  15221 Successfully connected to Storage Manager.
2006-08-29 03:56:54 15223  15221 Begin salvage for log 6.
2006-08-29 03:56:54 15223  15221 Completed salvage of logical log 6 (Storage Manager 
copy ID: 0 10247).
2006-08-29 03:56:55 15223  15221 Successfully connected to Storage Manager.
2006-08-29 03:56:55 15223  15221 Begin cold level 0 restore rootdbs (Storage Manager 
copy ID: 0 10241).
2006-08-29 03:57:08 15223  15221 Completed cold level 0 restore rootdbs.
2006-08-29 03:57:10 15223  15221 Successfully connected to Storage Manager.
2006-08-29 03:57:10 15223  15221 Begin restore logical log 5 (Storage Manager copy 
ID: 0 10246).
2006-08-29 03:57:11 15223  15221 Completed restore logical log 5.
2006-08-29 03:57:11 15223  15221 Begin restore logical log 6 (Storage Manager copy 
ID: 0 10247).
2006-08-29 03:57:11 15223  15221 Completed restore logical log 6.
2006-08-29 03:57:17 15223  15221 Completed logical restore.
2006-08-29 03:57:19 15223  15221 /srv/IDS_SERVER/bin/OnBar_d complete, returning 0 (0x00)

At this point the Informix server will be in the quiescent mode.

onstat -
IBM Informix Dynamic Server Version 10.50.UC1     -- Quiescent -- Up 00:03:50 --
 34012 Kbytes

You need to manually bring the server online with the command onmode -m

OnBar simple test:

Please execute a simple test to make sure OnBar is working fine with TSM
1.Back-up database through OnBar by running the command OnBar -b -L0 .
2.Now delete all rows from a particular table.
3.Shut down the Informix Server Engine.
4.Restore the database by running the command OnBar -r.
5.Make the Informix server online and try fetch the data from the table.
You should find the data deleted at step 2 has been restored in the same table.

Common issues

  • If you get an error similar to "2006-08-14 10:39:02 8838 8836 XBSA Error (BSAInit): An unspecified XBSA error has occurred: 96" in the bar_act.log, the error is more related to TSM client set up, rather Informix set up. Please try to find the details from $DSMI_LOG/dsierror.log.
  • If you find the $DSMI_LOG/dsierror.log is empty and you are getting an error in bar_act.log, then it is most likely the permission issue of $DSMI_LOG and dsierror.log. Please give the required permission as mentioned in the configuration section.
  • Error in $DSMI_LOG/dsierror.log: Password file is not available

    Cause: txbsapswd/tdpipswd has not run yet

    Action: Please run txbsapswd/tdpipswd which ever is applicable to register the client on the TSM server.

  • Error in bar_act.log :
    2006-08-16 04:29:39 21717  21715 /usr4/IDS_SERVER/bin/OnBar_d -b -L0
    2006-08-16 04:29:39 21717  21715 Warning: BSA version is 5.2.1. This version does 
    not match 
    with the version(s) specified in /usr4/IDS_SERVER/etc/sm_versions .

    Cause: The TSM version number mentioned in $INFORMIXDIR/etc/sm_versions is wrong.

    Action: Please mention 5.2.1 as the version number of the TSM in the sm_versions file.

  • Error in bar_act.log :
    2006-08-18 00:46:11 10050  10048 /pe-home/INTEROP/sqldistxd9/bin/OnBar_d -l
    2006-08-18 00:46:12 10050  10048 ERROR: An unexpected error occurred:  ld.so.1:
    OnBar_d: fatal: /opt/tivoli/tsm/client/informix/bin/libTDPinf.so: wrong ELF class: 
    ELFCLASS32 .
    No such file or directory

    Cause: Wrong version of TDPI is installed in the system. This error happens often in dual systems. Please check whether all three products TSM API CLIENT, TDPI, and Informix are of the same architecture - they should all be 32-bit or they should all be 64-bit.

    Action: Please install the correct bit software.

  • Error in $DSMI_LOG/dsierror.log :
    07/14/06   01:01:05 ANS5216E Could not establish a TCP/IP connection with addres
    s 'SUN3500B.LENEXA.IBM.COM:1500'. The TCP/IP error is 'Connection refused' (errno = 146).
    07/14/06   01:01:05 ANS4039E Could not establish a session with a TSM server or client 
    agent.  The TSM return code is -50.
    07/14/06   01:01:05 ANS1017E Session rejected: TCP/IP connection failure
    07/14/06   01:01:05 ANS1017E Session rejected: TCP/IP connection failure

    Cause: The DSMI_DIR pointed to a different bit( 32/64) directory. This happens often in dual machines.

    Action: Please point the DSMI directory with the correct bit ( 32/64) directory.

  • Error in $DSMI_LOG/dsierror.log :
    08/17/06   05:35:40 ANS4993E IITSM SOL8 64 ANS1311 ANS1311E (RC11)   Server out of data 
    storage space

    Cause: There is no space remaining in the server storage volume.

    Action: Add more volume to the storage pool by using the TSM admin client.


TSM and Informix ontape Back-up and Restore Utility

This section elaborates on configuring and using TSM and Informix for ontape back-up and restore utility.

Prerequisites

  • The TSM server should be installed
  • The TSM BA client should be Installed
  • The TSM admin command line client should be installed
  • Informix should be installed on the same machine where the TSM back-up Archive Client is installed
  • One instance of Informix Server Engine is up and running with a sample database

Configuration of TSM server

Please visit the configuration of TSM Server section in the OnBar back-up restore facility.

Configuration of TSM Back-up Archive Client

Change your current directory to <{tsm client installation directory}/ba/bin > and search for a file named dsm.opt. If the same file is not present, please copy the dsm.opt.smp to dsm.opt. Now change the value of the server name in that file to the TSM server name you set at the TSM server console.

servername <TSM server name>

Now in the same directory search for a file named dsm.sys. If it does not exist, please copy the dsm.sys.smp to dsm.sys . Also make sure that the file dsm.sys has the following settings.

SErvername   <TSM server name>
COMMMethod         TCPip <do not change>
TCPPort            1500 <do not change>
TCPServeraddress   <TSM server ip address>
PASSWORDACCESS GENERATE <- add this line if not there.>

Now create a directory "tsmlog" under /tmp if it is not present. Check the permission of the directory /tmp/tsmlog. The permission of the directory tsmlog should be 777. Create a file dsmerror.log in the same directory and change the file permission to 777.

After making these changes, please run the command dsmc as super user. It will ask for the TSM Server user ID and password. Please use user ID "admin" and password as same as we set during the TSM server configuration. When you enter all those correctly, you can log in and you will get a "tsm>" prompt. Please enter the command "quit" to come out of this prompt. Now as "informix" user, please run the command dsmc. This time you should not be asked for user verification and you will be directly prompt as "tsm>". Use the “quit” command again to come out of the "tsm>"

IBM Tivoli Storage Manager
Command Line Back-up/Archive Client Interface
  Client Version 5, Release 3, Level 4.0
  Client date/time: 19/12/06   11:54:51
(c) Copyright by IBM Corporation and other(s) 1990, 2006. All Rights Reserved.

Node Name: IDCPS2.IN.IBM.COM
Please enter your user id <IDCPS2.IN.IBM.COM>: admin

Please enter password for user id "ADMIN":

Session established with server TSM: AIX-RS/6000
  Server Version 5, Release 3, Level 2.0
  Server date/time: 19/12/06   11:54:51  Last access: 19/12/06   11:54:13

tsm>

Environment variable declaration

Please ensure the following environment variables are set in the same session from where the back-up and restore will be initiated.

INFORMIXDIR=<Informix Software Installation Directory>
PATH=$INFORMIXDIR/bin:.:/usr/local/bin:/bin:/usr/sbin:$PATH
INFORMIXSERVER=<Informix Server Instance Name> 
ONCONFIG=<Informix Server Configuration File> 
INFORMIXSQLHOSTS=$INFORMIXDIR/etc/<sqlhosts file>
DBSERVERNAME=<$INFORMIXSERVER>
DSM_DIR=<{tsm client installation directory}/ba/bin >
DSM_LOG=/tmp/tsmlog
DSM_CONFIG=$DSM_DIR/dsm.opt #< You may have to copy the dsm.opt.smp to dsm.opt 
(if not exists) >
PATH=$DSM_DIR:$PATH 
TERMCAP=<Informix Dir>/etc/termcap

Configure Informix for ontape

Now it is the time to configure Informix for the ontape-TSM back-up combination.

  • Please download the resources from the Downloads section and put them in the $INFORMIXDIR/bin directory with proper execution permission.
  • Parameters need to be set in the Informix server configuration (onconfig) file:
    TAPEDEV         <Informix Chunk Path >/tapedev # Create one file with user informix and 
    permission 666
    LTAPEDEV        <Informix Chunk Path >/ltapedev # Create one file with user informix and 
    permission 666
    
    Note: Please do not mention the same name for both tape devices.

    After making these configuration changes, please restart the Informix server engine to enable the new configuration to take effect.

Testing of ontape back-up and restore on TSM

Back-up: Database server should be in online mode

  • Archive full system

    Go to the Informix Log file directory and run the command ontape_back-up.sh | ontape -s| tee auto_ontape.log

    sun3500>> ontape_back-up.sh | ontape -s| tee auto_ontape.log
    Please enter the level of archive to be performed (0, 1, or 2)
    Please mount tape 1 on /usr/informix/data/tapedev and press Return to continue ...
    Tape is full ...
    
    Please label this tape as number 1 in the arc tape sequence.
    This tape contains the following logical logs:
    
     7
    
    Please mount tape 2 on /usr/informix/data/tapedev and press Return to continue ...
    Tape is full ...
    
    Please label this tape as number 2 in the arc tape sequence.
    
    Please mount tape 3 on /usr/informix/data/tapedev and press Return to continue ...
    Tape is full ...
    
    Please label this tape as number 3 in the arc tape sequence.
    
    Please mount tape 4 on /usr/informix/data/tapedev and press Return to continue ...
    Tape is full ...
    
    Please label this tape as number 4 in the arc tape sequence.
    
    Please mount tape 5 on /usr/informix/data/tapedev and press Return to continue ... 
    100 percent done.
    
    Please label this tape as number 5 in the arc tape sequence.
    
    Program over.
    sun3500>>

    The administrative console of TSM server will flash messages mentioning that the server connects by a client.

    You do not have to take action, everything is automated. You can keep watch of your terminal to know what is happening. Sometimes you might see an error similar to "Bad tape". The program is intelligent enough to take care of those errors. You should receive the message like the one above in your terminal only.

  • Continuous back-up of logical logs

    Go to the Informix log file directory and run the command ontape_back-up.sh | ontape -c | tee auto_ontape.log

    sun3500>> ontape_back-up.sh | ontape -c | tee auto_ontape.log
    
    Performing continuous back-up of logical logs.
    
    Please mount tape 1 on /usr/informix/data/ltapedev and press Return to continue...
    
    Tape is full ...
    
    Please label this tape as number 1 in the log tape sequence.
    
    This tape contains the following logical logs:
        7 (partial)
    
    Please mount tape 2 on /usr/informix/data/ltapedev and press Return to continue...
    Tape is full ...
    
    Please label this tape as number 2 in the log tape sequence.
    
    This tape contains the following logical logs:
        7 - 8
    
    Please mount tape 3 on /usr/informix/data/ltapedev and press Return to continue...
    Tape is full ...
    
    Please label this tape as number 3 in the log tape sequence.
    
    This tape contains the following logical logs:
        8 - 9
    
    Please mount tape 4 on /usr/informix/data/ltapedev and press Return to continue...
    Tape is full ...
    
    Please label this tape as number 4 in the log tape sequence.
    
    This tape contains the following logical logs:
        9 (partial)
    
    Please mount tape 5 on /usr/informix/data/ltapedev and press Return to continue...

    The administrative console of TSM server will flash messages mentioning that the server connects by a client.

    You do not have to take action, everything is automated. You can keep watch of your terminal to know what is happening. Sometimes you might see an error similar to "Bad tape". The program is intelligent enough to take care of those errors. As soon as the logical log fills the tape, it will take the backup and transfer the backed up tape files to tsm. You should receive a message like the one above in your terminal.

  • Automatic back-up of the logical log

    Please use the command ontape_back-up.sh | ontape -a | tee auto_ontape.log to take a logical log back-up.

Restore

  • Physical restore: Database server will be in shutdown mode.

    Go to the Informix log file directory and run the command ontape_p_restore.sh | ontape -p | tee auto_ontape.log. It will show you the list of first tape drives from different full-system back up taken on different days and times. You’re required to choose one of them.and select Enter. You do not have to choose an option, it will bring the different backup tapes from TSM Server and restore them. The terminal message will only look like the following:

    sun3500>> ontape_p_restore.sh | ontape -p | tee auto_ontape.log
    
    Please mount tape 1 on /usr/informix/data/tapedev and press Return to continue .
    .. /usr/informix/data/main950.09-12-2006-06:16.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:24.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:28.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:36.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:38.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:45.1.tapedev
    /usr/informix/data/main950.09-12-2006-06:48.1.tapedev
    /usr/informix/data/main950.09-12-2006-08:09.1.tapedev
    /usr/informix/data/main950.09-14-2006-05:11.1.tapedev
    /usr/informix/data/main950.09-14-2006-05:25.1.tapedev
    /usr/informix/data/main950.09-14-2006-06:40.1.tapedev
    Please enter the file number with path
    /usr/informix/data/main950.09-14-2006-06:40.1.tapedev (I choose this file)
    Files retrieved  successfully from tsm ...
    
    Archive Tape Information
    
    Tape type:      Archive Back-up Tape
    Online version: IBM Informix Dynamic Server Version 7.31.UN233
    Archive date:   Thu Sep 14 06:40:38 2006
    User id:        informix
    Terminal id:    ?
    Archive level:  0
    Tape device:    /usr/informix/data/tapedev
    Tape blocksize (in k): 16
    Tape size (in k): 400
    Tape number in series: 1
    
    Spaces to restore:1 [rootdbs           ]
    
    Archive Information
    
    IBM Informix Dynamic Server Copyright(C) 1986-2004  IBM Informix Software, Inc.
    Initialization Time       09/14/2006 06:38:50
    System Page Size          2048
    Version                   6
    Archive CheckPoint Time   09/14/2006 06:40:38
    
    Dbspaces
    number   flags    fchunk   nchunks  flags    owner    name
    1        1        1        1        N        informix rootdbs
    
    
    Chunks
    chk/dbs offset   size     free     bpages   flags pathname
    1   1   0        10000    4663              PO-   /usr/informix/data/rootdbs
    
    Continue restore? (y/n)Do you want to back up the logs? (y/n)
    Please mount tape 2 on /usr/informix/data/tapedev and press Return to continue ... 
    Tape sequence number is 1, expecting 2
    
    Bad tape.
    
    Please mount tape 2 on /usr/informix/data/tapedev and press Return to continue .
    ..
    Please mount tape 3 on /usr/informix/data/tapedev and press Return to continue .
    ..
    Please mount tape 4 on /usr/informix/data/tapedev and press Return to continue ... 
    Restore a level 1 archive (y/n)
    Program over.
    sun3500>>

    The administrative console of TSM server will flash messages mentioning that the server connects by a client.

    You do not have to select an option, everything is automated. You can keep watch of your terminal to know what is happening.

  • Logical restore : Database Server is in Fast Recovery mode ( Physical restore Completed)

    1. Open two sessions and set the environment for both sessions

    2. Now from one session, run the command ontape -l . A message similar to the following will flash.

      Roll forward should start with log number 7
    
      Please mount tape 1 on /usr/informix/data/ltapedev and press Return to continue...

    3. Now from another session, run the command ontape_l_restore.sh for a list of all the logical logs back-up. Please choose the correct one and Enter. The desired tape will be mounted on the logical tape device and you will receive confirmation. The message will flash in the screen in this way:

    /usr/informix/data/main950.7(partial).ltapedev
    /usr/informix/data/main950.7-8.ltapedev
    /usr/informix/data/main950.8-9.ltapedev
    /usr/informix/data/main950.9(partial).ltapedev
    /usr/informix/data/main950.Pleaselabelthistapeasnumber7inthearctapesequence..lta
    pedev
    Please enter the file name to restore
    /usr/informix/data/main950.7(partial).ltapedev ( I enter this logical log)
    IBM Tivoli Storage Manager
    Command Line Back-up/Archive Client Interface
      Client Version 5, Release 3, Level 4.0
      Client date/time: 09/14/06   09:17:21
    (c) Copyright by IBM Corporation and other(s) 1990, 2006. All Rights Reserved.
    
    Node Name: SUN3500.LENEXA.IBM.COM
    Session established with server SERVER1: Linux/i386
      Server Version 5, Release 3, Level 2.0
      Server date/time: 09/14/06   09:13:10  Last access: 09/14/06   09:13:01
    
    Restore function invoked.
    
    Restoring         409,600 /usr/informix/data/main950.7(partial).ltapedev [Done]
    
    
    Restore processing finished.
    
    Total number of objects restored:         1
    Total number of objects failed:           0
    Total number of bytes transferred:    400.07 KB
    Data transfer time:                    0.02 sec
    Network data transfer rate:        15,086.17 KB/sec
    Aggregate data transfer rate:        131.65 KB/sec
    Elapsed processing time:           00:00:03
    File restored successfully
    File mounted on tapedev ... Please continue the back-up
    Press <q> when you are finished else press enter ..

    The administrative console of TSM server will flash messages mentioning that the server connects by a client.

    You do not have to select an option, everything is automated. You can watch your terminal to know what is happening.

    4. After getting the confirmation message similar to File mounted on tapedev ... Please continue the backup. Please select the session showing Please mount tape 1 on /usr/informix/data/ltapedev and press Return to continue... and ENTER.

    5. Log back up will be restored and after the restore is complete, it will flash the message, Do you want to restore another log tape? (y/n). If you want to continue, select Y, if not, select N. On selecting Y , it will show a message like this, Please mount tape 2 on /usr/informix/data/ltapedev and press Return to continue...Selecting N displays the message "Program over" and puts the database server in "Quiescent mode".

    6.. If you want more logical log restore, choose Enter for the 2nd session. Again, you will see the list of logical logs and you choose the correct one.After mounting the logical log on the Log tape device correctly, select Enter in the first session to restore the mounted log. Repeat steps 5 and 6 as soon as your restoration is in progress.

ontape simple test:

Please do a simple test to make sure ontape is working fine.

1.Back-up data through ontape by running the command ontape_back-up.sh | ontape -s |tee 
auto_ontape.log.
2.Now start the continues log back-up by ontape_back-up.sh | ontape -c |tee auto_ontape.log.
3.Make some transaction so that the atleast one logical log fulls
4.Make the Informix-Server down.
5.Restore the database by running the command ontape_p_restore.sh | ontape -p | tee 
auto_ontape.log
6.Restore the backed up logical log with the combination of the command 
ontape_r_restore.sh and ontape -l as described in the document
7.Make the Informix server online and try to see the changes you made after the 
archive back-up.

Limitations

The scripts we reference here to perform back-up and restore with TSM and ontape have some limitations.

  • Level 1 and Level 2 back-up and restore not possible through these scripts.
  • You have to take Level 0 back up then opt for continuous logical log back-up.
  • A physical restore only restores the level 0 back-up. After that you have to restore the logical log manually through the two scripts as mentioned above.
  • These scripts are created and tested on Solaris OS. For other OS's you might have to change some minor things as the syntax changes in shell scripts.
  • A too big-sized tape device should not be declared as the transfer time to TSM server will take a long time.

Downloads

DescriptionNameSize
Utility for TSM Back-up through ontape1ontape_backup.sh4KB
Utility for TSM-Logical Log restore through ontape2ontape_l_restore.sh2KB
Utility for TSM-Physical restore through ontape3ontape_p_restore.sh3KB

Notes

  1. This is a shell script ( tested on Solaris) for TSM-ontape back-up
  2. This is a shell script ( tested on Solaris) for TSM-ontape logical log restore.
  3. This is a shell script ( tested on Solaris) for TSM-ontape physical restore. This utility can restore only level 0 back-up.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Tivoli (service management) on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Tivoli (service management), Tivoli, Information Management
ArticleID=193895
ArticleTitle=Informix back up with Tivoli Storage Manager: Using OnBar and ontape utility
publish-date=03152007