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 Migrating and upgrading Informix. The steps described here are
based on the below assumptions:
- Customer already has an instance running. For example: Azure-VMName.
- Customer has downloaded the 'private key', specified when they setup the instance: Example azure-key.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 Azure 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} azureuser@${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-azure-key.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/* azureuser@${TGT}:/data; eval ${sudorsync} ~informix/passwords azureuser@${TGT}:~informix; eval ${sudorsync} ~informix/sqlhosts azureuser@${TGT}:~informix; eval ${sudorsync} ~informix/client_ssl azureuser@${TGT}:~informix; eval ${sudorsync} ~informix/server/etc/ol_informix_disk_encryption* azureuser@${TGT}:~informix/server/etc;
-
Backup copy of old onconfig and any other files you have customized:
eval ${sudorsync} ~informix/server/etc/onconfig.ol_informix azureuser@${TGT}:~informix/server/etc/onconfig.ol_informix.old
- Finish applying any customized settings you need to the TGT system, then start the TGT server.