Informix

 View Only
Expand all | Collapse all

Informix IDS 10 - Windows 32 bits - ontape

  • 1.  Informix IDS 10 - Windows 32 bits - ontape

    Posted Thu February 16, 2023 10:14 AM

    Hello group good morning.
    Please, could you help me with the ontape backup of an informix IDS 10?
    My IDS is on windows 32 bit, it is a very old system and I would like to make incremental backups which I successfully did with:
    cd Informix\bin
    ontape -s -L 0 -t STDIO >"c:\backinf\L0Backup"

    ...

    a few hours later

    ...


    cd Informix\bin
    ontape -s -L 1 -t STDIO >"c:\backinf\L1Backup"

    The problem is that then I don't know how to restore them including to level 0 and level 1.

    In the documentation I could find, it says how to do it in linux, but not how to do it in windows.
    Thank you very much in advance.
    Guillermo


    ------------------------------
    guillermo villanueva
    ------------------------------


  • 2.  RE: Informix IDS 10 - Windows 32 bits - ontape

    IBM Champion
    Posted Thu February 16, 2023 11:27 AM

    Giullermo:

    Here. OK, ontape expects to restore from a file. so:

    1. Rename the level 0 archive file to something like:
      C:\backinf\RestoreFile
    2. If the engine you want to restore is online, take it offline with:
      onmode -ky
    3. Kick off ontape restore with:
      ontape -r -t C:\backinf\RestoreFile
    4. When ontape asks if you want to restore a level 1 archive, rename the level 0 file back to its original name, then rename the level 1 archive file to the same name as you did in #1: C:\backinf\RestoreFile
    5. Respond 'Y' to ontape's prompt and it will restore the level 1 archive from the named file.
    6. When it prompts to ask if you want to restore a level 2 archive, reply 'N' if you do not have one, or repeat #4 for the level 2 archive file and respond 'Y'
    7. When it prompts to ask if you want to restore logical log backups, then reply as appropriate. Ontape will look for the logical log backup files to be the path specified in the LTAPEDEV parameter in the ONCONFIG file. If that is a folder path, then ontape will find the files itself under that folder. If it is a filename, then you will have to sequentially rename each logical log backup file to that pathname before letting ontape attempt to restore that log backup. When you have run out of log files to restore, just reply 'N' to the prompt.
    8. When ontape completes the engine will be in Quiescent mode. You should bring the engine online with "onmode -m" before doing anything else. If you do not bring the engine fully online before shutting it down you will have to start the restores all over again. The engine needs to complete fast recovery be going to "OnLine" mode before shutting down.

    The problem you will have on Windows is the difficulty of renaming the backup files between level restores. Make sure to open a window to do that in before starting the restore.

    On a side note, seriously consider upgrading to the latest release of Informix (v 14.10.FC9W1). If you are currently living on an old Windows machine with Informix v10.00 you can probably get away with a free Innovator-C Edition or very inexpensive Express Edition license. Reach out to me privately if you want to talk about getting back into support and a modern version of Informix. Each of the versions after 10.00 (11.10, 11.50, 11.70, 12.10, & 14.10) was faster than the last and new hardware is MUCH faster, so... Also a new major release will drop in 2023.



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: Informix IDS 10 - Windows 32 bits - ontape

    Posted Thu February 16, 2023 12:44 PM

    Art, thank you very much for your help, I will try it now.
    I haven't thought about upgrading to newer versions because they are migrating almost all systems to Postgresql. There are only a few systems left in Informix and I have to backup them, that's why my questions about ontape.
    So far we were backing up with dbexport.



    ------------------------------
    guillermo villanueva
    ------------------------------



  • 4.  RE: Informix IDS 10 - Windows 32 bits - ontape

    Posted Fri February 17, 2023 02:49 AM

    Informix also has the possibility to be backed up directly to a backup server using "onbar" (Online Backup And Restore) commands.

    That is a much easier and secure way to perform backup and restores, as you do not have to perform restores of all your local dump files, plus that you can stay protected up to last fully written transactional log.

    If you anyhow want to keep your backups on a local Path, such as "c:\backinf\L0Backup", than you can also mount the IBM Spectrum Protect as a drive letter on your server.

    This can be useful when you plan your backups of the PostgreSQL database data, as one can use almost anytype of backup tools to protect the database data, such as pg_probackup, pg_dumpall, pg_dump,...

    https://www.spictera.com or https://www.ibm.com/partnerworld/bpdirectory/partner/a2woh%20%20%20/spictera/solution/56435/spfs---a-filesystem-for-spectrum-protect-2.4/en/

    Or if you want to take snapshots (linux only) and store these snapshots on the IBM Spectrum Protect backup server, than this can be useful to read

    https://www.ibm.com/partnerworld/bpdirectory/partner/a2woh%20%20%20/spictera/solution/56927/spictera-snapshot--instant-recovery-for-spectrum-protect-2.4/en/

    Good luck with your migrations, and restore

    Regards Tomas Dalebjörk

    Spictera



    ------------------------------
    Tomas Dalebjörk
    ------------------------------



  • 5.  RE: Informix IDS 10 - Windows 32 bits - ontape

    Posted Wed February 22, 2023 07:51 AM

    Art Kagel, thank you very much for your response.

    When I tried to do step 3 it gave me a syntax error and threw the ontape help, then I tried the following syntax:
    ontape -r -t STDIO < "e: \backinf\RestoreFile".

    This way when I ran it, it stayed working and I was waiting for it to ask me for the level 1 file, but it never did, it finished processing and showed me again the windows prompt leaving the informix in "Quiescent" status, but ontape never asked me for the other backup files.

    What could have happened, can you help me?



    ------------------------------
    guillermo villanueva
    ------------------------------



  • 6.  RE: Informix IDS 10 - Windows 32 bits - ontape

    IBM Champion
    Posted Wed February 22, 2023 08:07 AM
    Guillermo,

    the recommended approach would be using the -t parameter with a file name
    instead of using STDIO with a redirect.
    Art described it that way.
    Since redirecting the input in restore process leaves no choice to getting input
    for a level 1 (y/n) (because stdin is redirected and keyboard is not known any more
    to the ontape process), the DB server will assume a finished backup, having no possibility
    to ask for user input.
    I am not sure about windows installations, but for a backup with -t parameter, the destination file
    needs to exist as empty file before ontape is called (empty, with informix:informix / mode 660).

    So backup should be taken with ontape -s -L 0/1 -t FILENAME
    And restore with ontape -r -t FILENAME
    That way, stdin is not redirected and leaves the option to ask for user input 
    about a possible level 1 backup.

    MARCUS HAARMANN






  • 7.  RE: Informix IDS 10 - Windows 32 bits - ontape

    Posted Wed February 22, 2023 08:39 AM
    Edited by guillermo villanueva Wed February 22, 2023 08:42 AM

    Thank you very much for the answer.
    The problem is that in IDS 10, this syntax:
    ontape -r -t FILENAME

    Does not work, it gives error: Invalid argument

    ------------------------------------------------

    E:\Informix\bin>onmode -ky

    E:\Informix\bin>ontape -r -t "e:\backinf\RestoreFile"
    invalid argument

    ------------------------------------------------

    ------------------------------
    guillermo villanueva
    ------------------------------



  • 8.  RE: Informix IDS 10 - Windows 32 bits - ontape

    IBM Champion
    Posted Wed February 22, 2023 08:42 AM
    OK, was not aware of this (too long ago).
    In this case, put your filename as TAPEDEV in onconfig and invoke the 
    backup with ontape -s -L 0/1. (without the -t option)
    You possibly need to create the file with the correct permissions before calling ontape -s
    as I mentioned earlier.

    MARCUS HAARMANN






  • 9.  RE: Informix IDS 10 - Windows 32 bits - ontape

    IBM Champion
    Posted Wed February 22, 2023 09:50 AM

    Guillermo:

    This command:

    ontape -r -t e:\backinf\RestoreFile

    with no quotes and no space between the drive designator (e:) and the file path (\backinf\RestoreFile) should work. 

    Try again! I pretty certain that it was the space between the e: and the file path that was the issue.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 10.  RE: Informix IDS 10 - Windows 32 bits - ontape

    Posted Wed February 22, 2023 10:55 AM

    Thanks for your reply, I did the suggested corrections but the error persists.
    Anyway I was able to do the restore using the TAPEDEV parameter of the onconfig.

    Thank you very much for the help you gave me.



    ------------------------------
    guillermo villanueva
    ------------------------------