Creating a clone of a primary server
Use the ifxclone utility to create a clone of a primary server.
About this task
The general steps to create a clone of a server are as follows:
Procedure
- Verify that the ENABLE_SNAPSHOT_COPY configuration parameter
on the source server is set to
1. - Verify that the CDR_AUTO_DISCOVER configuration parameter is set to 1, and that the REMOTE_SERVER_CFG file is set on all cluster servers.
- Set the following environment variables on the target server:
- INFORMIXDIR
- INFORMIXSERVER
- ONCONFIG
- INFORMIXSQLHOSTS
-
On the target server, create all of the chunks that exist on the source server. You can use the --createchunkfile
option (-k) to automatically create cooked chunks on the target server.
Follow these steps to create the chunks:
- Create an sqlhosts file on the target server's host, and add the target server's connectivity information to the file.
- On the source server, run the admin() or task() function with the cdr add trustedhost argument, including the target server's trusted-host information.
-
While still logged in as user informix, run the ifxclone utility with
the --autoconf option (-a) and other appropriate parameters on
the target system on which the clone server is started.
Note: If trusted-host information was added manually, do not use the --autoconf option; you must configure trusted hosts and sqlhosts file information manually.
Example: Cloning a primary server
For this
example, you have the following system:
- server_1 is the source server and has the following sqlhosts file
entries:
#dbservername nettype hostname servicename options server_1 onsoctcp host1.example.com 123 - server_1 has the following configuration parameter settings:
- ENABLE_SNAPSHOT_COPY 1
- CDR_AUTO_DISCOVER 1
- REMOTE_SERVER_CFG authfile.server_1
- server_1 has the following trusted-host file entries
#trustedhost host1 host1.example.com host2 host2.example.com - server_2 is the target server, is on host2.example.com, and uses port 456.
- On the target server, log in as user informix and use the touch, chown, and chmod commands to create, change the owner, and change the permissions for the chunks. The chunk paths must match the paths of the chunks on the source server. You can use the --createchunkfile option (-k) to automatically create cooked chunks on the target server.
- Run the ifxclone utility on the target server as user
informix:
ifxclone -T -S server_1 -I host1.example.com -P 123 -t server_2 -i host2.example.com -p 456 -a -kifxclone -T -S server_1 -I host1.example.com -P 123 -t server_2 -i host2.example.com -p 456 -a
The ifxclone utility modifies the sqlhosts file
on the source server and creates a copy of the file on the new target
server:
#dbservername nettype hostname servicename options
server_1 onsoctcp host1.example.com 123
server_2 onsoctcp host2.example.com 456The ifxclone utility
also propagates the trusted-host file on the source server to the
target server.