Previous Topic: Restore the Database after a ReinstallationNext Topic: Resynchronize the Databases


Recover from an Upgrade Failure

Restore the CA Performance Center database from a backup archive after a software upgrade that fails to complete. If an error occurs during an upgrade of the CA Performance Center software, you must restore the database and then update the schema.

Note: Database restoration is not required after an upgrade unless a failure occurs. Take the cleanup steps that are described in Clean Up After a Failed Installation before you attempt the upgrade again. Then take the steps in this procedure.

Follow these steps:

  1. Log in to the server as root, or use the sudo account that you configured for the installation.
  2. Stop all of the CA Performance Center services, using the following commands:
    /etc/init.d/caperfcenter_eventmanager stop
    /etc/init.d/caperfcenter_devicemanager stop
    /etc/init.d/caperfcenter_sso stop
    /etc/init.d/caperfcenter_console stop
    

    The services are stopped.

  3. Change to the directory where you saved the backup archive. For example:
    cd /$backupDir
    
  4. Uncompress the database backup archives for CA Performance Center and Event Manager by executing the following commands:
    tar zxvf netqosportal.tgz
    tar zxvf em.tgz
    
  5. Import the uncompressed CA Performance Center backup file:
    mysql netqosportal -e ‘source $backupDir/netqosportal.sql’
    
  6. Import the uncompressed Event Manager backup file:
    mysql em -e ‘source $backupDir/em.sql'
    
  7. Change to the following installation directory:
    cd /opt/CA/PerformanceCenter/Tools/bin
    
  8. Run the following command to verify the database version:
    mysql -P3306 -D netqosportal -u root
    
    mysql> select InstallDate, version, dbschemaversion from revision_info order by InstallDate asc;
    

    The output lists installation dates and versions of the software and database schema.

    If the database version does not match the current product version, take the next set of upgrade steps.

  9. Upgrade the database schema. From the Tools/bin directory, run the npcshell database utility to upgrade the schema to the current version:
    ./npcshell.sh upgradedb
    
  10. Run the following commands to import database translation files:
    /opt/CA/jre/bin/java -jar /opt/CA/PerformanceCenter/SQL/seedlu/bin/seedlu.jar -resfile "/opt/CA/PerformanceCenter/SQL/messages_en_US.properties" -ctrlfile "/opt/CA/PerformanceCenter/SQL/control.sdlctrl" -connection "jdbc:mysql://localhost:3306/netqosportal?useUnicode=true&characterEncoding=UTF-8" -user netqos -pwd netqos -lang en-US
    
    /opt/CA/jre/bin/java -jar /opt/CA/PerformanceCenter/SQL/seedlu/bin/seedlu.jar -resfile "/opt/CA/PerformanceCenter/SQL/messages_zh_CN.properties" -ctrlfile "/opt/CA/PerformanceCenter/SQL/control.sdlctrl" -connection "jdbc:mysql://localhost:3306/netqosportal?useUnicode=true&characterEncoding=UTF-8" -user netqos -pwd netqos -lang zh-CN
    
    /opt/CA/jre/bin/java -jar /opt/CA/PerformanceCenter/SQL/seedlu/bin/seedlu.jar -resfile "/opt/CA/PerformanceCenter/SQL/messages_zh_TW.properties" -ctrlfile "/opt/CA/PerformanceCenter/SQL/control.sdlctrl" -connection "jdbc:mysql://localhost:3306/netqosportal?useUnicode=true&characterEncoding=UTF-8" -user netqos -pwd netqos -lang zh-TW
    
    /opt/CA/jre/bin/java -jar /opt/CA/PerformanceCenter/SQL/seedlu/bin/seedlu.jar -resfile "/opt/CA/PerformanceCenter/SQL/messages_fr_FR.properties" -ctrlfile "/opt/CA/PerformanceCenter/SQL/control.sdlctrl" -connection "jdbc:mysql://localhost:3306/netqosportal?useUnicode=true&characterEncoding=UTF-8" -user netqos -pwd netqos -lang fr-FR
    
    /opt/CA/jre/bin/java -jar /opt/CA/PerformanceCenter/SQL/seedlu/bin/seedlu.jar -resfile "/opt/CA/PerformanceCenter/SQL/messages_ja_JP.properties" -ctrlfile "/opt/CA/PerformanceCenter/SQL/control.sdlctrl" -connection "jdbc:mysql://localhost:3306/netqosportal?useUnicode=true&characterEncoding=UTF-8" -user netqos -pwd netqos -lang ja-JP
    
  11. Update the information that CA Performance Center uses to display administration pages and views. Run the following commands:

    CA Infrastructure Management Administration Pages:

    ./npcshell.sh dbmigrate -package com.ca.im.plugin.pc -path ../../SQL/plugins/pc/
    

    Event-Related Views:

    ./npcshell.sh dbmigrate -package com.ca.im.plugin.em -path ../../SQL/plugins/eventmanager/
    

    Data Aggregator Administration Pages and Views:

    ./npcshell.sh dbmigrate -package com.ca.im.plugin.da -path ../../SQL/plugins/polaris/
    
  12. Run the following command again to verify the database version after you have upgraded it:
    mysql -P3306 -D netqosportal -u root
    
    mysql> select InstallDate, version, dbschemaversion from revision_info order by InstallDate asc;
    
  13. Start all of the CA Performance Center services:
    /etc/init.d/caperfcenter_eventmanager start
    /etc/init.d/caperfcenter_devicemanager start
    /etc/init.d/caperfcenter_sso start
    /etc/init.d/caperfcenter_console start
    
  14. Delete the uncompressed archive files to save space:
    rm netqosportal.sql
    
    rm em.sql
    
  15. Log in to CA Performance Center as an administrator.
  16. Verify that your configuration data appears in Admin pages.