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 deployments:
    #!/usr/bin/env bash
    # -----------------------------------------------------------------------------
    #      Licensed Materials - Property of IBM
    #
    #      IBM Cognos Products: ca
    #
    #      (C) Copyright IBM Corp. 2022
    #
    #      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
    ARTIFACTS_POD=$(oc  -n $namespace get pods  | grep -e "^ca.*-artifacts.*" | awk '{print $1}')
    dep_home='/artifacts-data/deployment/files/'
    oc rsh -n $namespace ${ARTIFACTS_POD} 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 a deployment:
    #!/usr/bin/env bash
    # -----------------------------------------------------------------------------
    #      Licensed Materials - Property of IBM
    #
    #      IBM Cognos Products: ca
    #
    #      (C) Copyright IBM Corp. 2022
    #
    #      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
    ARTIFACTS_POD=$(oc  -n $namespace get pods  | grep -e "^ca.*-artifacts.*" | awk '{print $1}')
    dep_home='/artifacts-data/deployment/files'
    oc -n $namespace cp ${ARTIFACTS_POD}:${dep_home}/$deployment $deployment
    Tip:

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