Migrating Informix data between clusters

Import or export Informix data between Cloud Pak for Data clusters.

Use the cpd-cli export-import utility to migrate Informix data between Cloud Pak for Data clusters. This method performs the migration by running the Informix `dbimport` and `dbexport` DBA tools.

Before you begin

  • Make sure that you completed the prerequisite tasks and initialized the cpd-cli export-import utility. For more information, see Migrating data between Cloud Pak for Data installations.
  • Check whether the auxiliary for Informix service instance you want to export is listed in both Cloud Pak for Data clusters. Run the following command to determine which auxiliary modules are installed:
    cpd-cli export-import list aux-modules -n ${INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME}
  • Set the IFX_INSTANCE_NAME environment variable to the instance name for your Informix server instance.
    export IFX_INSTANCE_NAME="<informix-service-instance-name>"
  • Set the DEST_INSTANCE_PROJECT environment variable to the project in the destination cluster for your instance.
    export DEST_INSTANCE_PROJECT="<project-in-destination-cluster>"
    Tip: If you are using the same project in the destination cluster as your source cluster, use the INSTANCE_PROJECT environment variable:
    export DEST_INSTANCE_PROJECT=${INSTANCE_PROJECT}

Procedure

Export the Informix data from the source cluster:

  1. From the source environment, use the export create command to create the data export job.
    cpd-cli export-import export create -n ${INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME} --instance-name ${IFX_INSTANCE_NAME} --service-type informix ${EXPORT_JOB_NAME}
  2. Verify that the export job is complete in the namespace.

    Run the following command to check the status of the export job in the zen namespace:

    cpd-cli export-import export status -n ${INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME} ${EXPORT_JOB_NAME}

    This command displays the following output:

    • Active = 1: The export job is in progress.
    • Succeeded = 1: The export job completed successfully.
    • Failed = 1: The export job failed.
  3. From the source cluster, use the export download command to download the exported data.
    cpd-cli export-import export download -n ${INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME} ${EXPORT_JOB_NAME}
  4. Use the export upload command to upload the data into the destination project.
    cpd-cli export-import export upload -n ${DEST_INSTANCE_PROJECT} -f cpd-exports-${EXPORT_JOB_NAME}-YYYYMMDDNNNNNN-data.tar --profile=${CPD_PROFILE_NAME}

    cpd-exports-${EXPORT_JOB_NAME}-YYYYMMDDNNNNNN-data.tar is the name of the downloaded file that contains the exported data.

  5. Use the import create command to create the data import job in the destination project.
    cpd-cli export-import import create ${IMPORT_JOB_NAME} --from-export ${EXPORT_JOB_NAME} --namespace=${DEST_INSTANCE_PROJECT}
  6. Verify that the import job is complete in the destination project.
    cpd-cli export-import import status ${IMPORT_JOB_NAME} --namespace=${DEST_INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME}
    Tip: If you need to start another import job, delete the last import job before you start a new one.
    cpd-cli export-import import ${IMPORT_JOB_NAME} delete --namespace=${DEST_INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME}

What to do next

To verify that the migration is successful:

  1. Open the Informix DMC for the Informix service instance in the destination environment. See Viewing Informix Data Management Console
  2. Explore the 'db1' database and verify that the schema and data in the destination environment are the same as in the source environment.