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
- Open the Cognos Analytics service.
-
Click Manage, and then click Administration
Console.
The Administration console opens in a new window.
- Select the Configuration tab, and then select Content Administration.
- Select New Export and type a name.
- Click Next and select the option to export the entire content store or selected contents and then click Next.
-
Set a password for the backup file, and click OK.
This is the password you need for the restore.
- Select Next and then select Save and run to generate the file for backup.
- Click Finish.
-
Click OK and wait until the export is completed
successfully.
Tip: To verify whether the export has successfully completed, you can check the status.
-
Copy the backup file locally for later restoration:
- Navigate to the location where you want to save the backup file.
- Copy the cluster login command from the openshift cluster and login to the cluster to copy the deployments.
-
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)
-
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.
-
Download the content from the cluster:
- Create a new file called: download_deployment.sh.
-
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)
-
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.