Informix

 View Only
Expand all | Collapse all

Is it possible to import the copy made with ontape from one database to another PC?

  • 1.  Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 12:13 PM

    Dear All:

    I'm asking you about this because I made a copy of an Informix server with ontape to import it into a PC for convenience and security reasons (avoid working with real data).

    On the PC I installed Informix 7.31 TD6 for Windows, which is the same version as the server, I created the same dbspaces on the same disk drives as the server, and I also named the chunks the same on both computers. I also made sure to create the dbspaces in the same order and obviously respecting their size. Also the ONCONFIG is the same for both.

    The only difference is the operating system, since the server has a 32-bit Windows 2008 server, while the PC has a 64-bit Windows 10.

    When I want to do ontape -r, it shows me everything that has been backed up and asks me if I want to restore, which I confirm of course, but after accepting, the command window remains without showing anything for about 15 or so. 20 minutes, and finally it informs me that it cannot connect to the server.

    I clarify that also on the PC I changed the INFORMIXDIR, INFORMIXSERVER and ONCONFIG environment variables so that they remained the same.

    Has anyone been able to do what I can't?

    I thank you in advance for your kindness and time.

    Gustavo Echenique.



    ------------------------------
    Gustavo Echenique
    ------------------------------


  • 2.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 12:51 PM

    Gustavo:

    It sounds like you configured and started an Informix instance on the new box. Neither ontape nor onarchive will perform a full restore to a running instance. You could only restore single dbspaces to a running instance. So here is what you do:

    1. Make sure that the SERVERNAME on the new box is the same as the source server was/is. 
    2. Make sure that TAPEDEV is pointed to the archive file.
    3. Make sure that TAPEBLOCK is the same as it was when the archive was created.
    4. Take the running instance offline (onmode -ky).
    5. Restore: ontape -r

    Art



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



  • 3.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 01:08 PM

    Dear Art:

    When I ran the ontape, I made sure to turn down the motor with onmode -ky.

    What raises doubts in my mind is that on the server the drive where the backup is recorded is mapped as W:, but on the PC it is as E: . Could this have something to do with it?



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 4.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 01:41 PM

    Gustavo:

    As long as the TAPEDEV is set to the correct path for the copied file that's not an issue.

    Art



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



  • 5.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 03:54 PM
    Hi,

    I don't think the drive letter where the backup is located would make a difference.
    I would assume, ontape -r is trying to start oninit and does not find it.
    Did you check the online.log if a startup was tried and failed for some reason (like shared memory config etc.) ?

    It was already mentioned that a very easy way to get a copy would be to shut down the primary
    instance while taking a clean copy of the dbspace files and 
    put them in the same folder on the target machine.
    Then just start with oninit, new server name can be different.
    Not sure about this old version, but onmode -c block would also be sufficient in order to be able
    to copy data without inconsistency. (onmode -c unblock to allow writes again)


    Marcus Haarmann





  • 6.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 05:02 PM

    Hello Marcus!

    I have looked at the online.log and the error that appears is that the logical log does not exist and it does not let me raise the instance.



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 7.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 02:31 PM
    just take the instance down and copy the files ?  Depending on bandwidth that might be quicke

    On 5/29/2024 11:13 AM, Gustavo Echenique via IBM TechXchange Community wrote:
    0100018fc5205be6-5f2f5f83-d7f6-4d12-9fc4-cdf13af13dfc-000000@email.amazonses.com">
    Dear All: I'm asking you about this because I made a copy of an Informix server with ontape to import it into a PC for convenience and security...





  • 8.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Wed May 29, 2024 05:06 PM

    Hello Paul!

    Could you explain to me in more detail about deleting the instance and copying the files?



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 9.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Thu May 30, 2024 11:20 AM

    I've already checked everything, and it doesn't work.

    Now he also does not raise the case. Obviously the ontape has restored the logical logs but cannot do the physical restoration.



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 10.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Thu May 30, 2024 11:23 AM
    Can you do an oninit -i on the new server to make sure it actually can start ?

    On 5/30/2024 10:20 AM, Gustavo Echenique via IBM TechXchange Community wrote:
    0100018fca1699b0-242b1d30-e055-49c6-bd91-25b0f9761fd7-000000@email.amazonses.com">
    I've already checked everything, and it doesn't work. Now he also does not raise the case. Obviously the ontape has restored the logical logs...





  • 11.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Thu May 30, 2024 11:51 AM

    Yes, of course Paul, but the "-i" switch will unbind the dbspaces for me, won't it?



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 12.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Thu May 30, 2024 12:14 PM

    Gustavo:

    Not a problem with running the oninit -i. Ontape creates the dbspaces and chunks from the contents of the archive. It just needs all of the chunk files to exist and have enough free space on the filesystem to hold the data that's being restore to each chunk. The chunk files can even be completely empty zero length files. Ontape doesn't care.

    Art



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



  • 13.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Thu May 30, 2024 12:35 PM
    Oninit -i will just startup a freshly initialized instance on your target machine with just the rootdbs being aktive, and it will construct sysmaster database.
    Do this to make sure you have installed everything correctly. 
    Then, shutdown the instance with onmode -kcy and make sure you have at least a n empty file with the correct permissions for each chunk you are restoring and start ontape -r.
    Alternatively, shut down the old server and copy the files in case you are not succeeding with ontape. Then just start with oninit -v

    Marcus

    Gesendet von Outlook für Android





  • 14.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 09:57 AM

    I have tried starting the server with the -i switch but it has no effect.
    Sometimes it cuts off in the initialization phase, and other times in the Fast Recovery phase, but it always ends up warning that the shared memory could not be initialized.



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 15.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 10:35 AM

    Gustavo:

    Post the following and we'll see what we can see:

    • The last 30 lines from the message log.
    • Your sqlhosts file.
    • The server's host's name or IP address (whichever you used in the sqlhosts file)
    • You ONCONFIG file.

    If we don't see what the issue is, someone will have to look at your system live (via Zoom?) and that will likely be a chargeable consultation. I could do that for you if needed as can several others on this forum. Hopefully we will see the issue and you will be on your way.

    Art



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



  • 16.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri June 07, 2024 05:27 PM

    Hello Art!

    I've been building a new Informix 7.31 TD6 engine for Windows all this week in my little free time.

    I have configured everything according to the Informix manuals, and I think everything is fine.

    I say estimate, because last night I tried again and it gave me the sad error message: "Physical restore failed - could not fork server connection".

    In your last message you asked me for a copy of the sqlhosts file, but there is no file with that name in Windows, I had come to think that it only worked on Unix or Linux.

    But then in the Informix manuals for Windows NT, in the backup and restore chapter it talks about saving the sqlhosts.

    Is the sqlhosts file necessary in an Informix installation on Windows?

    Can the lack of it cause Ontape to abort the restoration?



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 17.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri June 07, 2024 05:41 PM
    I believe even in 7.31 versions, a sqlhosts file was needed, independent of the platform.
    Informix is mostly dependent on some environment variables which point to the location
    of the informix base dir, the onconfig file (if deviating file name) and so on.
    Honestly, I never installed a windows server version (only as ODBC client),
    always used some kind of Un*x (Solaris/SCO/Linux/HP UX).
    I remember there was a tool called setnet32, which is still present in newer versions.
    Check out the following documentation, which should apply to 7.31 mostly.
    IBM Informix client/server connectivity information, the sqlhosts information, contains information that enables a client application to find and connect to any IBM Informix database server on the network.


    A client application connects to the Informix database server that is running on a computer that can be reached through the network. To establish the connection, use Setnet32 to specify the location of the Informix database server on the network and the network communications protocol to use. You must obtain this information from the administrator of the database server you want to use.
    Check on the production machine, which settings were chosen.
    Good luck.

    MARCUS HAARMANN







  • 18.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Sat June 08, 2024 03:33 AM
    Gustavo,

    I am not sure what your reason would be to copy the instance from this very old
    machine.
    If you just need the data, I would encourage you to export it with dbexport in text files
    and then dbimport it in a newer version (the format is portable and should be importable
    to a very recent version, when the charsets are the same).
    Obviously, you do not have any documentation from the old instance, which makes it
    complex to reproduce it by re-installing.
    Also, windows installations are not that common, so there is probably only a limited number
    of people being able to recall how it was done 25years ago.
    In case you need the same environment for whatever purpose, you need to figure out
    how the production setup was done (probably involving some values in the registry
    which need to be present).
    You did not tell us if it was possible to start an empty instance on your machine with oninit -i.
    (which shows reaction when you connect to it using dbaccess).
    As already stated, this would be a basic test to see if you have a proper installation.
    What has not been asked: how did you create the ontape backup ?
    Should have been done with ontape -s -L 0 in order to get a full archive.
    Or is this a very old backup that you are trying to restore, not knowing how that one was created ?

    MARCUS HAARMANN







  • 19.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri June 07, 2024 06:35 PM
    Gustavo:

    You do know that v7.31TD6 is circa 1996, right? It is VERY OLD and outdated in many ways. One of those is that the Windows version does not use an sqlhosts file at all, but uses the Windows Registry for storing connectivity details. There is an app included that sets those parameters (don't remember what it is since the last several major releases do support sqlhosts files on Windows so I don't ever use that util any longer (and rarely work on a Windows based server either).

    If you want to play with Informix, you should go to IBM's Informix home page (www.informix.com), click where it says "Try Developer Edition" or "Try Innovator-C Edition" and download Informix v14.10 for Windows. That is the latest release. The Developer Edition is free to use for development, training, testing, etc. It is full featured but resource and connection limited. The Innovator-C Edition is free to use for any purpose (even production) but some features are not available and it is also resource limited. (Further down the page there are descriptions of the various Editions and a link that will take you to a comparison chart.) 

    Anyway, If you run Innovator-C Edition on a reasonably current host with the latest Windows version, I'd guess that it will be more powerful than that old v7.31 release. If you need more resources (memory, storage, and CPU) than Innovator-C permits  and you need this for production, you can purchase the Express Edition which is not expensive as such things go.

    I really think you should give up on v7.31.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 20.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Mon June 10, 2024 04:27 AM

    Before hoping to get a restore working, first make sure you can get the instance running as a brand new one (oninit -i) - my impression is this step still is missing, in which case we'd have to understand what's inhibiting it.

    One problem could well be with fairly old 32bit Informix running on much newer 64bit Windows.

    As for sqlhosts file:  nope, didn't exist back then, Informix rather relied on HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SQLHOSTS registry hive, managed through Informix "setnet32.exe".   This registry hive might be one source of your problem since newer Windows versions, ircc., use separete registry branches for 32bit and 64bit executables ... 



    ------------------------------
    Andreas Legner
    ------------------------------



  • 21.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 11:00 AM
    I would guess, the memory sizes taken from the source machine are not fitting your memory
    settings.
    Also check sqlhosts vs. DBSERVERNAME/DBSERVERALIAS in onconfig.
    You should be able to start a local instance by only having a shared memory connection,
    which is then referenced as DBSERVERNAME.

    Check online.log what really is happening. In case you cannot startup a fresh instance, a restore
    would fail anyway on that machine.
    You need to have the instance startable.
    There could be a OS issue as well, because at the time 7.31 was around, nobody was aware about
    Win 10....
    If that is the case, I would recommend putting the original OS in a VirtualBox/VMWare/any sort of VM in order to
    get a running instance.
    Anyway, you would see at least some messages in the online.log which might point to the source
    of your problem (could be a missing or incompatible .DLL, memory sizing, OS issues, permission issues).

    MARCUS HAARMANN







  • 22.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 11:57 AM

    Hi Marcus.

    The online.log tells me that it cannot find the log and that it cannot do a rollforward, nothing more than that.



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 23.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 12:24 PM

    After the restore, when ontape asks if you want to restore logs, say "No" then once ontape exits, the engine will be in recovery mode. Bring it to online mode with "onmode -m". Did you do that? If not, try it.

    Art



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



  • 24.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 12:33 PM

    Hi Art

    When starting the restoration it asks me if I want to make a backup of the logs, and I answered yes the first time.
    If so, I may have damaged the instance, and now if I answer yes or no, it doesn't matter, it tells me that it cannot connect to the engine and in the online.log it tells me that it cannot find the logical log to do a rollforward and lower the instance.



    ------------------------------
    Gustavo Echenique
    ------------------------------



  • 25.  RE: Is it possible to import the copy made with ontape from one database to another PC?

    Posted Fri May 31, 2024 12:35 PM

    Whatever exists doesn't matter. When it asks if you want to backup the current logs, say "No" also, you do not need them and they will not be compatible with the logs stored in the archive. That may be your problem.

    Art



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