Informix

 View Only
  • 1.  restore through STDIO

    Posted Mon August 22, 2022 11:39 PM
    HI,
        I want to backup the instance and restore to another 3 instance.
      1, I run the blow comand to do the backup.
          ontape -s -L 0 -t STDIO | gzip >level-0.gz
       then, I use scp copy the zip file to another machine.
     2, I try to run below command to do the restore ,
      chmod 660 level-0.gz
      gunzip level-0.gz | ontape -p -t STDIO
      it report below error messages.
       Physical restore failed - function read archive backup failed code 1 errno 0

     I already set the TAPEDEV and LTAPEDEV to STDIO.
        any suggestions are welcome, thanks.

    Lu chuan

    ------------------------------
    chuan lu
    ------------------------------

    #Informix


  • 2.  RE: restore through STDIO

    IBM Champion
    Posted Tue August 23, 2022 12:49 AM
    Since gunzip is just uncompressing file (and not producing any STDIO output), you should use -c switch to do stdout u compression:
    gunzip -c level-0.gz | ontape -p -t STDIO

    Also, you can use zcat command.
    HTH
    Hrvoje


    ------------------------------
    Hrvoje Zokovic
    ------------------------------



  • 3.  RE: restore through STDIO

    IBM Champion
    Posted Tue August 23, 2022 02:00 AM
    Hi,

    use the BACKUP_FILTER and RESTORE_FILTER in config instead. This makes sense because you cannot forget
    any options when restoring (in a hurry ....).
    Make sure the options are correct for compressing/decompressing stdout/stdin.
    gzip needs -c argument or --stdout
    You can use gzip -d -c to decompress
    (we are using pigz because of better performance)

    MARCUS HAARMANN






  • 4.  RE: restore through STDIO

    Posted Tue August 23, 2022 02:09 AM

    gunzip FILENAME???? replaces the file with a decompressed equivalent; nothing is sent to standard out.

    You need to use:

    ?? zcat FILENAME | ontape ...


    --

    Rob Newton
    Mirrabooka Systems
    Ph: +61 7 3857 7899
    email: robn@mirrabooka.com
    web: www.mirrabooka.com






  • 5.  RE: restore through STDIO

    Posted Tue August 23, 2022 02:39 AM
    Hello.
    Unless you are trying to create an RSS node on your cluster, I don't see any benefits in using zip/unzip.
    1-huge cpu consumption in a serialized method.
    2-your network link should be already a high speed to accomodate your primary load for HDR replication.
    3-if you are dealing with RSS, use pigz or another parallel compress utility, but not zip.

    Hope that helps




    Alexandre Marini





  • 6.  RE: restore through STDIO

    Posted Tue August 23, 2022 04:24 AM
    Edited by System Fri January 20, 2023 04:34 PM
    Chuan Lu

    What's wrong with ifxclone? if you are insistent on using STDIO, then this is what I have done in the past;

    Create this backup script somewhere on your source server...
    $ cat ~/myScripts/ontape_backup.sh  
    INFORMIXDIR=/opt/informix/informixdir
    INFORMIXSERVER=mySourceServer
    PATH=$PATH:$INFORMIXDIR/bin
    export INFORMIXDIR INFORMIXSERVER PATH

    ontape -s -L 0 -F -t STDIO | gzip
    If this backup is not going to form part of your scheduled backups, then make it a fake backup so that no details of it are retained. Then on the target server...
    $ onmode -ky

    $ ssh <SourceServer> ~/myScripts/ontape_backup.sh |gunzip - |ontape -p -t STDIO; onmode -m

    This is pretty much what other have already responded with.



    ------------------------------
    Kirit Rana
    ------------------------------



  • 7.  RE: restore through STDIO

    IBM Champion
    Posted Sat September 10, 2022 07:51 AM


    HI,

    ifxclone can change the onconfig on the target instance

    E.g. it will turn off DIRECT_IO and can also change bufferpool entries!

    Regards,

    David.



    ------------------------------
    David Williams
    ------------------------------



  • 8.  RE: restore through STDIO

    Posted Sat September 10, 2022 04:23 PM
    Edited by System Fri January 20, 2023 04:51 PM
    Hey David

    Correct, ifxclone will not clean up after itself. It's a given that there will be an element of manual intervention once ifxclone has completed its work.

    I think DBSERVERALIASES is also unset, but don't quote me on that. The sqlhosts file will need attention as well.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 9.  RE: restore through STDIO

    Posted Tue August 23, 2022 05:04 AM

     Change the restore command to:

    gunzip -c level-0.gz | ontape -p -t STDIO



    ------------------------------
    Philip Yeh
    ------------------------------