Migrating and upgrading
About this task
Note: The steps described here can be applied on any other cloud or on-prem.
For more information on Migarting and upgrading, see https://help.hcl-software.com/hclinformix/1410/1infocenter/mignode.html. The steps described here are based on the below assumptions:
- Customer already has an instance running. For example: ec2-52-203-141-175.compute-1.amazonaws.com.
- Customer has downloaded the 'private key', specified when they setup the instance: Example aws-db.pem.
- Customer has done a level 0 backup of the current server.
- Customer has shutdown the current database server.
Procedure
- Launch new instance of HCL Informix (14.10.10) from AWS Marketplace.
-
From your local system, copy the private key (.pem) to the current and new instances:
Note:
(In the following steps, replace ${KEY} with your actual key file name, and ${SRC}, ${TGT} with the system names or ip addresses)
scp -i ${KEY} ubuntu@${SRC}:
-
Log into current machine:
ssh -i ${KEY} ${SRC}
-
Set the following variables, updated with your specific
names:
TGT={your-new-vm-instance-name-or-IP} KEY={your-private-aws-key-file-name.pem}
-
Log into new instance:
ssh -i ${KEY} ${TGT}
-
Shutdown database using onmode:
sudo -u informix bash; onmode -ky; exit; exit;
- Recursively (-r) Copy required files and directories from old instance to new, keeping ownership and permissions (-a) and using compression (-z).
-
Run these command as-is:
sudorsync="sudo rsync -e 'ssh -i $KEY' --rsync-path='sudo rsync' -a -v -z"; eval ${sudorsync} /data/* ubuntu@${TGT}:/data; eval ${sudorsync} ~informix/passwords ubuntu@${TGT}:~informix; eval ${sudorsync} ~informix/sqlhosts ubuntu@${TGT}:~informix; eval ${sudorsync} ~informix/client_ssl ubuntu@${TGT}:~informix; eval ${sudorsync} ~informix/server/etc/ol_aws_disk_encryption* ubuntu@${TGT}:~informix/server/etc;
-
Backup copy of old onconfig and any other files you have customized:
eval ${sudorsync} ~informix/server/etc/onconfig.ol_aws ubuntu@${TGT}:~informix/server/etc/onconfig.ol_aws.old
- Finish applying any customized settings you need to the TGT system, then start the TGT server.