Backing up Cognos Analytics

A Cognos® Analytics administrator can use the Cognos Analytics administration console to create a backup.

Before you begin

To complete this task, you must have the Analytics Adminstrator role in Cognos Analytics.

Procedure

  1. Open the Cognos Analytics service.
  2. Click Manage, and then click Administration Console.
    The Administration console opens in a new window.
  3. Select the Configuration tab, and then select Content Administration.
  4. Select New Export and type a name.
  5. Click Next and select the option to export the entire content store or selected contents and then click Next.
  6. Set a password for the backup file, and click OK.
    This is the password you need for the restore.
  7. Select Next and then select Save and run to generate the file for backup.
  8. Click Finish.
  9. Click OK and wait until the export is completed successfully.
    Tip: To verify whether the export has successfully completed, you can check the status.
  10. Copy the backup file locally for later restoration:
    1. Navigate to the location where you want to save the backup file.
    2. Copy the cluster login command from the openshift cluster and login to the cluster to copy the deployments.
    3. Create a new file called list_deployment.sh:
      • /list_deployment.sh: usage: ./list_deployment.sh [-h] -n namespace
      • -h prints help to the console
      • -n namespace namespace or project (required)
  11. To list all the deployments in the current CM pod:
    #!/usr/bin/env bash
    # -----------------------------------------------------------------------------
    #      Licensed Materials - Property of IBM
    #
    #      IBM Cognos Products: ca
    #
    #      (C) Copyright IBM Corp. 2019
    #
    #      US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
    # -----------------------------------------------------------------------------
    set -e
    namespace=
    function usage {
        echo $0: usage: $0 [-h] -n namespace
    }
    function help {
        usage
        echo "-h                prints help to the console"
        echo "-n namespace      namespace or project (required)"
        echo ""
        exit 0
    }
    while getopts ":hn:" opt; do
         case ${opt} in
         h)
            help
            ;;
         n)
            namespace=$OPTARG
            ;;
         \?)
            usage
            exit 0
            ;;
         esac
    done
    if [ -z $namespace ]; then
        echo "A namespace must be provided"
        help
    fi
    cm_pod=$(oc -n $namespace get po | grep -e "^ca.*-cm-0.*" | awk '{ printf $1 }')
    dep_home='/home/ibmuser/cognos/analytics/deployment'
    oc`` -n $namespace exec ${cm_pod} -c cm-0 -it -- ls -l ${dep_home}/
    Tip:

    Download the file locally to the folder where you run the script from.

  12. Download the content from the cluster:
    1. Create a new file called: download_deployment.sh.
    2. The following command allows you to download a single deployment file:
      • ./download_deployment.sh: usage: ./download_deployment.sh [-h] -d deployment -n namespace
      • -h prints help to the console
      • -d deployment deployment (required)
      • -n namespace namespace or project (required)
  13. To download all the deployments in the current CM pod:
    #!/usr/bin/env bash
    # -----------------------------------------------------------------------------
    #      Licensed Materials - Property of IBM
    #
    #      IBM Cognos Products: ca
    #
    #      (C) Copyright IBM Corp. 2019
    #
    #      US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
    # -----------------------------------------------------------------------------
    set -e
    namespace=
    deployment=
    function usage {
        echo $0: usage: $0 [-h] -d deployment -n namespace
    }
    function help {
        usage
        echo "-h                prints help to the console"
        echo "-d deployment     deployment (required)"
        echo "-n namespace      namespace or project (required)"
        echo ""
        exit 0
    }
    while getopts ":hd:n:" opt; do
         case ${opt} in
         h)
            help
            ;;
         d)
            deployment=$OPTARG
            ;;
         n)
            namespace=$OPTARG
            ;;
         \?)
            usage
            exit 0
            ;;
         esac
    done
    if [ -z $namespace ]; then
        echo "A namespace must be provided"
        help
    fi
    if [ -z $deployment ]; then
        echo "A deployment must be provided"
        help
    fi
    cm_pod=$(oc -n $namespace get po | grep -e "^ca.*-cm-0.*" | awk '{ printf $1 }')
    dep_home='/home/ibmuser/cognos/analytics/deployment'
    oc -n $namespace cp ${cm_pod}:${dep_home}/$deployment $deployment -c cm-0
    Tip:

    Download the file locally to the folder where you run the script from.