Informix

 View Only
Expand all | Collapse all

How to recover database informix to another computer using Spectrum Protect

  • 1.  How to recover database informix to another computer using Spectrum Protect

    Posted Wed January 18, 2023 09:26 AM

    There is no information about the configuration necessary to recover the database to another computer in documentation: https://www.ibm.com/docs/en/informix-servers/14.10?topic=manager-configuring-spectrum-protect. I would like to know if there any environment variable to set before the onbar -r commad that indicate the client(source) or if we have to change any spectrum client's configuration file.

    We are used to use the Networker, so to this, we have to set variables like:

    NSR_CLIENT
    NSR_LOG_VOLUME_POOL
    NSR_SERVER
    NSR_DATA_VOLUME_POOL

    and then, execute onbar -r command.

    Can anyone help me?



    ------------------------------
    Camila Marinho de Barros
    ------------------------------


  • 2.  RE: How to recover database informix to another computer using Spectrum Protect

    Posted Fri January 20, 2023 07:04 AM
    Edited by Tomas Dalebjörk Fri January 20, 2023 07:04 AM
    Hi Camila,

    Tomas here from Spictera .
    We have some different options for you to perform redirect restore.

    Redirect restore from source to target using IBM Spectrum Protect
    Alternative 1 using ASNODE:
    ===========================

    On the Spectrum Protect server:
    SP> GRANT PROXYNODE TARGET=sourcenode AGENT=targetnode

    Create a redirect restore option file (dsm.opt), pointing out other configuration stanza in dsm.sys
    root@targetserver# echo SERVERNAME restore > /tmp/dsm.opt

    Create a new stanza in dsm.sys
    root@targetserver# cat >> /opt/tivoli/tsm/client/api/bin64/dsm.sys <<- EOF
    SERVERNAME restore
    TCPSERVERADDRESS backup.server.com
    NODENAME targetnode
    ASNODE sourcenode
    PASSWORDACCESS generate
    ERRORLOGNAME /var/log/dsmerror_restore.log
    EOF

    Point out the new option file, by setting the DSMI_CONFIG environment variable, pointing to the location of the newly created dsm.opt file
    root@targetserver# export DSMI_CONFIG=/tmp/dsm.opt

    Perform your redirected restore
    root@targetserver# onbar -r

    Alternative 2 using same source node credentials:
    =================================================

    Create a redirect restore option file (dsm.opt), pointing out other configuration stanza in dsm.sys
    root@targetserver# echo SERVERNAME restore > /tmp/dsm.opt

    Create a redirect restore option file (dsm.opt), pointing out other configuration stanza in dsm.sys
    root@targetserver# cat >> /opt/tivoli/tsm/client/api/bin64/dsm.sys <<- EOF
    SERVERNAME restore
    TCPSERVERADDRESS backup.server.com
    NODENAME sourcenode
    PASSWORDACCESS generate
    ERRORLOGNAME /var/log/dsmerror_restore.log
    EOF

    Point out the new option file, by setting the DSMI_CONFIG environment variable, pointing to the location of the newly created dsm.opt file
    root@targetserver# export DSMI_CONFIG=/tmp/dsm.opt

    Point out the new option file, by setting the DSM_CONFIG environment variable (needed to set password), pointing to the location of the newly created dsm.opt file
    root@targetserver# export DSM_CONFIG=/tmp/dsm.opt

    Point out location of dsm.sys file for "dsmc"
    root@targetserver# export DSM_DIR=/opt/tivoli/tsm/client/api/bin64

    Save the source node password
    root@targetserver# dsmc # Enter the sourcenode and the password for the sourcenode

    If you don't remember the source nodes password, than one can set a new password on the Spectrum Protect server
    SP> UPDATE NODE sourcenode newpwd

    Perform your redirected restore
    root@targetserver# onbar -r

    Alternative 3 using virtualnode: <<--- have never tried this
    ===========================================

    You need to add the "VIRTUALNODENAME sourcenode" to the current used dsm.opt file
    root@targetserver# echo VIRTUALNODENAME sourcenode >> /opt/tivoli/tsm/client/api/bin64/dsm.opt

    Regards Tomas

    Spictera creates innovative Climate Smart Energy Efficient solutions
    We have agentless solutions (Spictera SPFS) where one can mount the IBM Spectrum Protect on a path on your server (mountpoint of filesystem)
    Eg
    # mount -t spfs /backup

    All file operations that goes via this path is translated directly to IBM Spectrum Protect Client API calls
    So a backup/restore using onbar/rman/mysqldump is more easy to manage, as the solution is agentless.
    One can see all the backups using native OS commands etc.

    With Spictera Snapshot, one can take application consistent snapshots directly to a IBM Spectrum Protect server, using progressive block level incremental forever techniques. Controlling the retention of the snapshot on the IBM Spectrum Protect server, and are not limited to a hardware
    Restoring a snapthot is nearly instant

    Contact us for more information: https://www.spictera.com 

    ​Regards Tomas


  • 3.  RE: How to recover database informix to another computer using Spectrum Protect

    IBM Champion
    Posted Fri January 20, 2023 10:09 AM
    I don't know about Networker, but Spectrum Protect appears to be based on TSM.

    You can try following the steps for a redirected restore.  I may well have missed something...

    Let's assume that you have taken a backup on Server A and want to restore to Server B...

    1. Shut down informix on Server B (if Informix is installed, configured, and running)
    2. Copy the file $INFORMIXDIR/etc/ixbar.<servernum> from Server A to Server B
    3. Edit the ixbar file on Server B and remove all entries before the last full backup.  Search back from the end of the file until you find the rootdbs mentioned for a Level 0.
    4. Copy over the $ONCONFIG file from Server A to Server B (assuming that there isn't one already - don't overwrite if there is), and make any changes necessary for Server B
    5. Make sure that BAR_BSALIB_PATH in the $ONCONFIG file on Server B points to the correct library
    6. Make sure that BAR_ACT_LOG and BAR_DEBUG_LOG in $ONCONFIG on Server B point to valid directories (the files do not need to exist)
    7. Copy over the sqlhosts file ($INFORMIXDIR/etc/sqlhosts or file pointed to by $INFORMIXSQLHOSTS) from Server A to Server B (assuming that there isn't one already), and make any changes as necessary.
    8. Copy over the $INFORMIXDIR/etc/oncfg* file from Server A to Server B.  Rename to have the INFORMIXSERVER of Server B and SERVERNUM of Server B.
    9. export IFX_SERVERNUM=<SERVERNUM of Server A>
    10. If Server B will have a different location for the root dbs, then update the ONCONFIG on Server B to match that used on Server A.  Same with the root path offset.
    11. Set the following env variables as necessary on Server B (change as needed for your environment)
    export DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/???.opt
    export DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
    export DSMI_LOG=/usr/tivoli/tsm/client/api/bin64

    Then try a restore on Server B:

    onbar -r -p

    Check the file referenced by BAR_ACT_LOG for messages.

    If successful (unlikely on the first try in my experience!), and you are not planning to use Server B for replicating with Server A, then perform the logical restore:

    onbar -r -l

    I may probably missed a step or two, and you will need to determine what you need to do that is additional for Networker or Spectrum, but this may get you started.  

    Mike

    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------