Transferring Impact data between OCP clusters
The nci_export and nci_import tools can be used to
export and import Impact data between OCP clusters.
About this task
Transferring Impact data between OCP clusters uses the nci_export and
nci_import commands. You run nci_export on one OCP cluster, copy
the data over to a second OCP cluster, and run nci_import.
However, the exported data could contain the host names of pods within the cluster, for example,
the ncoprimary pod. You must update any cluster specific host names within the
files before importing them into a new cloud based Impact instance.
For example, the following nci_export collection includes host names from within
the cluster:
NCI_0_ImpactDB.ds:ImpactDB.Derby.PRIMARYHOST=evtmgr1-nciserver-0.evtmgr1-nciservers.noi1.svc.cluster.local
NCI_0_ImpactDB.ds:ImpactDB.Derby.BACKUPHOST=evtmgr1-nciserver-1.evtmgr1-nciservers.noi1.svc.cluster.local
NCI_0_RBA_Derby.ds:RBA_Derby.Derby.PRIMARYHOST=evtmgr1-nciserver-0.evtmgr1-nciservers.noi1.svc.cluster.local
NCI_0_RBA_Derby.ds:RBA_Derby.Derby.BACKUPHOST=evtmgr1-nciserver-1.evtmgr1-nciservers.noi1.svc.cluster.local
NCI_0_RBA_ObjectServer.ds:RBA_ObjectServer.ObjectServer.PRIMARYHOST=evtmgr1-objserv-agg-primary
NCI_0_RBA_ObjectServer.ds:RBA_ObjectServer.ObjectServer.BACKUPHOST=evtmgr1-objserv-agg-backup
NCI_0_defaultobjectserver.ds:defaultobjectserver.ObjectServer.PRIMARYHOST=evtmgr1-objserv-agg-primary
NCI_0_defaultobjectserver.ds:defaultobjectserver.ObjectServer.BACKUPHOST=evtmgr1-objserv-agg-backup
NCI_0_emailsender.props:impact.emailsender.smtphost=evtmgr1-nciserver-0.evtmgr1-nciservers.noi1.svc.cluster.local
You would have to modify these for the new cloud cluster. You can either manually edit the files, or run a sed command on the files that require changing.
Procedure
for f in `find nci_export -type f | xargs grep <old release name> | awk -F':' '{print $1}' | sort -u`; do sed -i 's/<old namespace>/<new namespace>/g' $f; done
for f in `find nci_export -type f | xargs grep <old release name> | awk -F':' '{print $1}' | sort -u`; do sed -i 's/<old release name>/<new release name>/g' $f; done