Migrating Planning Analytics data between instances

Import or export Planning Analytics data between instances.

Use the cpd-cli export-import utility to migrate Planning Analytics data between instances. This method performs the migration by replacing all of the data in the destination environment with data from the source environment. For more information, see cpd-cli export-import.

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 IBM® Software Hub installations.
  • Check whether the planning-analytics-aux auxiliary module is listed in both instances. 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}
  • Make sure that you are using the internal version of the TM1 service. Export and import jobs for Planning Analytics support only the internal version of TM1.

    To determine if your TM1 service is external or internal, run the following command:

    oc get PAServiceInstance ${SERVICE_NAME} -n zen -o jsonpath='{.spec.tm1_internal_type}'

    If this command displays true as the output, your TM1 service is internal.

  • Set the DEST_INSTANCE_PROJECT environment variable to the project in the destination instance.
    export DEST_INSTANCE_PROJECT="<project-in-destination-instance>"
    Tip: If you are using the same project in the destination instance as your source instance, use the INSTANCE_PROJECT environment variable:
    export DEST_INSTANCE_PROJECT=${INSTANCE_PROJECT}

Procedure

Export the Planning Analytics data from the source instance:

  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} -c=planning_analytics ${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.
    Tip: Before you run another export job, use the export delete command to delete and purge the data from the last export job.
    cpd-cli export-import export delete -n ${INSTANCE_PROJECT} --profile=${CPD_PROFILE_NAME} ${EXPORT_JOB_NAME} --purge

Import the Planning Analytics data into the destination instance:

  1. From the source instance, 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}
  2. 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.

  3. 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} --profile=${CPD_PROFILE_NAME} --log-level=debug --verbose
  4. 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. Log in to the Planning Analytics instance in the destination environment.

    Imported databases appear in the destination environment but are shut down. To use these databases, you must go to the Administration page to find and restart the databases.

  2. Open a book and verify that the data and graphs in the destination environment are the same as the data and graphs in the source environment.