IBM Support

How to backup and restore all data and settings

Question & Answer


Question

How to backup and restore all data and settings

Cause

The following instructions show how to backup and restore: Queries and Analytics configuration (Types, Concepts, Sentiments and Media Sets) from AdminApp and the analyzed data exported to AnalysisUI and Cognos Reports. Users and in-progress jobs are not backed up and may be lost after restoration.

Please note: This procedure is not intended to migrate data from one system to another. Instead, it should be used to backup one system and restore this same system in case something bad happens. So, make sure the system you are restoring is similar to the one you backed up, including the same number of tenants, same tenant IDs and context root, install paths etc.

BACKUP

Pre-requisites:

  • Have CCI 1.1.0.1 installed.
  • Have at least one tenant deployed.
  • All CCI jobs must be stopped.
  • All CCI services must be stopped.

Note: Learn how to stop or start CCI services here.

Steps
  1. Log in as cciusr on Data node and start DB2 using 'db2start' command
  2. Log in as cciusr on UI node.
  3. Create a directory in your backup partition to save the backed up AdminApp data. We will use /backup/admin_app_backup. Make sure cciusr user has permission to read and write to this folder.
  4. Backup AdminApp configuration data using IBM Cognos Consumer Insight backup and restore utility, which is located under <CCI>/cci_tmgmt/BackupRestoreUtility in the UI node. You can find the steps on how to use this utility on 'Configuration backup and restore' Chapter 10 of IBM Cognos Consumer Insight Administration Guide for 1.0.1.1 release. You can find the PDF version of the Cognos Consumer Insight documentation (http://www.ibm.com/support/docview.wss?uid=swg27019838) on the web.
    • Make sure you run the tool including all tenants. You can do this by setting all tenant names as a comma separated list to db_name_list property in backup.properties file.
    • Make sure you set /backup/admin_app_backup to configuration_output_path property in backup.properties file.
    • Make sure you choose "All" when asked about "Configuration type".
  5. Log in as db2inst1 on Data node.
  6. Create a directory in your backup partition to save the backed up Cognos Reports data. We will use /backup/cognos_reports_backup. Make sure db2inst1user has permission to read and write to this folder.
  7. Execute the following commands to backup Cognos Reports data.
    • # db2 CONNECT TO cognosdb;
    • # db2 QUIESCE DATABASE IMMEDIATE;
    • # db2 CONNECT RESET;
    • # db2 DEACTIVATE DB cognosdb;
    • # db2 BACKUP DB cognosdb TO /backup/cognos_reports_backup;
    • # db2 CONNECT TO cognosdb;
    • # db2 UNQUIESCE DATABASE;
    • # db2 CONNECT RESET;
    • # db2 ACTIVATE DB cognosdb;
  8. For each deployed tenant, execute the following commands. Replace <tenant_id> by the current tenant ID. You can get all databases (including tenants databases) using "db2 list database directory"
    • # db2 CONNECT TO <tenant_id>;
    • # db2 QUIESCE DATABASE IMMEDIATE;
    • # db2 CONNECT RESET;
    • # db2 DEACTIVATE DB <tenant_id>;
    • # db2 BACKUP DB <tenant_id> TO /backup/cognos_reports_backup;
    • # db2 CONNECT TO <tenant_id>;
    • # db2 UNQUIESCE DATABASE;
    • # db2 CONNECT RESET;
    • # db2 ACTIVATE DB <tenant_id>
  9. Stop DB2 using 'db2stop force' command
  10. Log in as cciusr on Data node.
  11. Find out where the index output directory is located. It is specified in INDEX_OUTPUT_PATH property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/indexoutput.
  12. Create a directory in your backup partition to save the indices. We will use /backup/analysis_ui_indices/. Make sure cciusr user has permission to read and write to this folder.
  13. Copy everything inside the index output directory into the backup directory:
    • # cp -R /local/cci/prod/dls/data/indexoutput/* /backup/analysis_ui_indices/
  14. Find out where the DAS sources directory is located. It is specified in DASSOURCES property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/indexoutput. If the folder is the same as INDEX_OUTPUT_PATH, go to step 17. We will use /local/cci/prod/dls/data/das_sources.
  15. Create a directory in your backup partition to save the DAS sources directory. We will use /backup/das_sources/. Make sure cciusr user has permission to read and write to this folder.
  16. Copy everything inside the DAS sources directory into the backup directory:
    • # cp -R /local/cci/prod/dls/data/das_sources/* /backup/das_sources/
  17. Find out where the Adhoc data directory is located. It is specified in ADHOC_DATA_DIR property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/staging.
  18. Create a directory in your backup partition to save the Adhoc data directory. We will use /backup/adhoc_data/. Make sure cciusr user has permission to read and write to this folder.
  19. Copy everything inside the Adhoc data directory into the backup directory. Some files may not be copied, because they are owned by db2inst1 user. These files can be ignored, since they are not used later.
    • # cp -R /local/cci/prod/dls/data/staging/* /backup/adhoc_data/
  20. Find out where the Scheduled data directory is located. It is specified in SCHEDULED_DATA_DIR property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/staging. If the folder is the same as ADHOC_DATA_DIR, go to step 23. We will use /local/cci/prod/dls/data/scheduled_data.
  21. Create a directory in your backup partition to save the Scheduled data directory. We will use /backup/scheduled_data/. Make sure cciusr user has permission to read and write to this folder.
  22. Copy everything inside the Scheduled data directory into the backup directory. Some files may not be copied, because they are owned by db2inst1 user. These files can be ignored, since they are not used later.
    • # cp -R /local/cci/prod/dls/data/scheduled_data/* /backup/scheduled_data/
  23. Find out where the Data Loader home directory is located. It is specified in DATALOADER_HOME property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/services/Dataloader.
  24. Create a directory in your backup partition to save the job status directory. We will use /backup/job_status/. Make sure cciusr user has permission to read and write to this folder.
  25. Copy jobstatus directory from inside Data Loader home directory into the backup directory:
    • # cp -R /local/cci/prod/dls/services/Dataloader/jobstatus /backup/job_status/
  26. Start all CCI services.

RESTORE

Note: Any in-progress job will be lost after restoration procedure.

Pre-requisites:
  • Have CCI 1.1.0.1 installed.
  • For each backed up tenant, make sure there is a deployed tenant with the same name (tenant ID and context root).
  • All CCI jobs must be stopped.
  • All CCI services must be stopped.

Steps
    1. Start DB2.
    2. Log in as cciusr in UI node.
    3. For each backed up tenant, restore its AdminApp configuration data using IBM Cognos Consumer Insight backup and restore utility. You can find the steps on how to use this utility on Chapter 10 of IBM Cognos Consumer Insight Administration Guide.
      • Make sure you choose "All" when asked about "Configuration type".
    4. Log in as db2inst1 in Data node.
    5. Execute the following commands to restore Cognos Reports data:
      • # db2 CONNECT TO cognosdb;
      • # db2 QUIESCE DATABASE IMMEDIATE;
      • # db2 CONNECT RESET;
      • # db2 DEACTIVATE DB cognosdb;
      • # db2 RESTORE DB cognosdb FROM /backup/cognos_reports_backup
        • Press y when asked to restore.
      • # db2 CONNECT TO cognosdb;
      • # db2 UNQUIESCE DATABASE;
      • # db2 CONNECT RESET;
      • # db2 ACTIVATE DB cognosdb;
    6. Execute the following commands for each tenant you backed up. Replace <tenant_id> by the current tenant ID. You can get all databases (including tenants databases) using "db2 list database directory"
      • # db2 CONNECT TO <tenant_id>;
      • # db2 QUIESCE DATABASE IMMEDIATE;
      • # db2 CONNECT RESET;
      • # db2 DEACTIVATE DB c<tenant_id>;
      • # db2 RESTORE DB <tenant_id> FROM /backup/cognos_reports_backup
        • Press y when asked to restore.
      • # db2 CONNECT TO <tenant_id>;
      • # db2 UNQUIESCE DATABASE;
      • # db2 CONNECT RESET;
      • # db2 ACTIVATE DB <tenant_id>;
    7. Stop DB2.
    8. Log in as cciusr on Data node.
    9. Find out where the index output directory is located. It is specified in INDEX_OUTPUT_PATH property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/indexoutput.
    10. For each backed up tenant, execute the command below to delete the actual index output directories. Replace <tenant_id> by the current tenant ID.
      • # rm -rf /local/cci/prod/dls/data/indexoutput/<tenant_id>
    11. Copy AnalysisUI backup files into the index output directory:
      • # cp -R /backup/analysis_ui_indices/* /local/cci/prod/dls/data/indexoutput/
    12. Find out where the DAS sources directory is located. It is specified in DASSOURCES property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/indexoutput. If the folder is the same as INDEX_OUTPUT_PATH, go to step 15. We will use /local/cci/prod/dls/data/das_sources here.
    13. For each backed up tenant, execute the command below to delete the actual DAS sources directories. Replace <tenant_id> by the current tenant ID.
      • # rm -rf /local/cci/prod/dls/data/das_sources/<tenant_id>
    14. Copy DASSources backup files into the DAS sources directory:
      • # cp -R /backup/das_sources/* /local/cci/prod/dls/data/das_sources/
    15. Find out where the Adhoc data directory is located. It is specified in ADHOC_DATA_DIR property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/staging.
    16. For each backed up tenant, execute the command below to delete the actual Adhoc data directories. Replace <tenant_id> by the current tenant ID.
      • # rm -rf /local/cci/prod/dls/data/staging/<tenant_id>
    17. Copy AdhocData backup files into the Adhoc data directory:
      • # cp -R /backup/adhoc_data/* /local/cci/prod/dls/data/staging/
    18. Find out where the Scheduled data directory is located. It is specified in SCHEDULED_DATA_DIR property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/data/staging. If the folder is the same as ADHOC_DATA_DIR, go to step 21. We will use /local/cci/prod/dls/data/scheduled_data here.
    19. For each backed up tenant, execute the command below to delete the actual Scheduled data directories. Replace <tenant_id> by the current tenant ID.
      • # rm -rf /local/cci/prod/dls/data/scheduled_data/<tenant_id>
    20. Copy ScheduledData backup files into the Scheduled data directory:
      • # cp -R /backup/scheduled_data/* /local/cci/prod/dls/data/scheduled_data/
    21. Find out where the Data Loader home directory is located. It is specified in DATALOADER_HOME property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /local/cci/prod/dls/services/Dataloader.
    22. Execute the command below to delete the actual jobstatus directory:
    23. # rm -rf /local/cci/prod/dls/services/Dataloader/jobstatus
    24. Copy JobStatus backup files into the Data Loader home directory:
      • # cp -R /backup/job_status/* /local/cci/prod/dls/services/Dataloader
    25. Log in as hadoop on Hadoop node.
    26. Find how where is Flow Manager home directory. It is specified in FLWMGR_HOME property in <cci_install_directory>/cci_tmgmt/properties/env.conf file during CCI installation. The default directory is /home/hadoop/FlowMgr.
    27. Execute the following commands to recreate Flow Manager's state store:
      • # cd /home/hadoop/FlowMgr
      • # rm -rf state/
      • # cd toroBackend/flowmanager/scripts/
      • # ./createstore.sh ../../../state FlowMgr.properties
    28. Start All CCI services.
[{"Product":{"code":"SSAQVS","label":"Cognos Consumer Insight"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Consumer Insight","Platform":[{"code":"PF016","label":"Linux"}],"Version":"1.1","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
Cognos Consumer Insight

Software version:
1.1

Operating system(s):
Linux

Document number:
197701

Modified date:
15 June 2018

UID

swg21578355