Moving Instance
Posted in 2017
Question: can an Informix installation in /opt/informix11.5 simply be moved to /opt/Informix/11.5 by editing environment variables and onconfig, or is a reinstall needed? Answer: yes, just shut the engine down, move the files, update INFORMIXDIR/PATH/SQLHOSTS and onconfig entries such as MSGPATH, and ideally use a symbolic link to INFORMIXDIR so future moves/upgrades only need the link repointed. For chunks, the engine stores paths internally, so you must either keep the original paths via symlinks (onstat -d output unchanged) or restore with ontape's -rename option. Poster was satisfied.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Server Administration
I have my files in /opt/informix11.5 Am I able to just move them over to /opt/Informix/11.5 if I change the environment variables and any affected parameters in the onconfig file or do I have to uninstall and reinstall to the new location?
If it's just the executables and such, then yes you could. If you have any chunks in that directory (I hope not!) then no. Make sure the engine is offline before you do so. Modify the MSGPATH and such that may be pointing to the "old" location before bringing the engine back up. The best practice is to use a symbolic link to point to the location of the Informix install, and have the environment variables (INFORMIXDIR, INFORMIXSQLHOSTS, PATH) use the link. That way, you can switch the location of the informix executables and you only have to change the symbolic link, and don't have to change scripts, profiles, etc. This comes in really useful when doing upgrades as you can install the new version ahead of time, and when you're ready to perform the upgrade, then shut down informix, repoint the link, and bring informix back up again. Mike -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI LONG Sent: Tuesday, April 18, 2017 7:07 AM To: ids@iiug.org Subject: Moving Instance [38952] I have my files in /opt/informix11.5 Am I able to just move them over to /opt/Informix/11.5 if I change the environment variables and any affected parameters in the onconfig file or do I have to uninstall and reinstall to the new location? **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
ok, thanks for the information Mike
What about chunks? Can you move them to a different directory as well?
Just offline the engine, move everything to /opt/Informix/11.5 and then link the two directories and restart Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI LONG Sent: Tuesday, April 18, 2017 8:07 AM To: ids@iiug.org Subject: Moving Instance [38952] I have my files in /opt/informix11.5 Am I able to just move them over to /opt/Informix/11.5 if I change the environment variables and any affected parameters in the onconfig file or do I have to uninstall and reinstall to the new location? **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
It depends if you are using symbolic links which point to the chunk files,
as is recommended. If you are using links, then you can move the chunks
around and just repoint the links while the engine is offline. If Informix
is using the links, then nothing changes as far as the engine is concerned.
If you aren't using links, then no, unfortunately moving chunks isn't as
straightforward. The references to these are all stored internally in the
engine.
You will have to recreate your instance with the new chunk layout and import
your data again. One way to do this is to use ontape to perform a backup
and then import with ontape and the -rename option to map the "old"
pathnames to the "new" pathnames. If you go this route, then make sure that
you create links for the new chunks, and use the links as the destination of
the new chunks in the rename. I hope that makes sense!
Mike
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Tuesday, April 18, 2017 7:25 AM
To: ids@iiug.org
Subject: Re: RE: Moving Instance [38955]
What about chunks? Can you move them to a different directory as well?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
If you are not using links then as long as you link the old location and new
location at a directory level you will be fine.
Bottom line as long as the path displayed via onstat -d is the same before
and after the move the engine doesn't care, for the most part, where those
files actually live
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Mike
Walker
Sent: Tuesday, April 18, 2017 8:41 AM
To: ids@iiug.org
Subject: RE: RE: Moving Instance [38960]
It depends if you are using symbolic links which point to the chunk files,
as is recommended. If you are using links, then you can move the chunks
around and just repoint the links while the engine is offline. If Informix
is using the links, then nothing changes as far as the engine is concerned.
If you aren't using links, then no, unfortunately moving chunks isn't as
straightforward. The references to these are all stored internally in the
engine.
You will have to recreate your instance with the new chunk layout and import
your data again. One way to do this is to use ontape to perform a backup
and then import with ontape and the -rename option to map the "old"
pathnames to the "new" pathnames. If you go this route, then make sure that
you create links for the new chunks, and use the links as the destination of
the new chunks in the rename. I hope that makes sense!
Mike
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Tuesday, April 18, 2017 7:25 AM
To: ids@iiug.org
Subject: Re: RE: Moving Instance [38955]
What about chunks? Can you move them to a different directory as well?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
As long as you maintain the existing paths using links, or do a restore with rename option -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI LONG Sent: Tuesday, April 18, 2017 8:25 AM To: ids@iiug.org Subject: Re: RE: Moving Instance [38955] What about chunks? Can you move them to a different directory as well? **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- ontape -p/r with changed ROOTPATH
- Migrate from HP PA-RISC to HP ITANIUM by ontape