Restore NetOps Portal

Restore an existing backup of
NetOps Portal
.
Use the following process to restore
NetOps Portal
:
  1. Do one of the following:
  2. (If your
    NetOps Portal
    deployment uses single sign-on) Restore the single sign-on settings.
  3. (If your
    NetOps Portal
    deployment includes custom OpenAPI applications) Restore the custom settings.
  4. (If you have script notification actions) Restore the script notification actions.
  5. (If the new
    NetOps Portal
    hostname is different from the original
    NetOps Portal
    host) Update the
    NetOps Portal
    disaster recovery script
    .
Restore the Database After a Reinstallation
Prerequisite:
You have reinstalled the software.
Restoring the database from a backup preserves data continuity and enables most historical reporting after a failure occurs.
Restore the database
only
if a failure occurs. Before attempting to upgrade again, clean up after a failed installation, then complete this procedure.
For more information about how to clean up after a failed installation, see Uninstall
NetOps Portal
.
Follow these steps:
  1. Log in to the server as 'root', or use the 'sudo' account that you configured for the installation.
  2. Stop the
    NetOps Portal
    services by issuing the following commands in the order listed, based on your installation:
    • (Red Hat Enterprise Linux (RHEL) 6.x)
      Stop the event manager:
      service caperfcenter_eventmanager stop
      Stop the device manager:
      service caperfcenter_devicemanager stop
      Stop the SSO service:
      service caperfcenter_sso stop
      Stop the
      NetOps Portal
      Console service:
      service caperfcenter_console stop
    • (RHEL 7.x/8.x, Oracle Linux (OL), and SUSE Linux Enterprise Server (SLES))
      Stop the event manager:
      systemctl stop caperfcenter_eventmanager
      Stop the device manager:
      systemctl stop caperfcenter_devicemanager
      Stop the SSO service:
      systemctl stop caperfcenter_sso
      Stop the
      NetOps Portal
      Console service:
      systemctl stop caperfcenter_console
  3. Change to the directory where you saved the backup archive by issuing the following command:
    cd
    backup_Directory
  4. Uncompress the database backup archives for
    NetOps Portal
    and the event manager by issuing the following commands:
    tar zxvf netqosportal.tgz
    tar zxvf em.tgz
  5. Import the uncompressed
    NetOps Portal
    backup file by issuing the following command:
    mysql netqosportal -u root -p
    password
    -e 'source $backupDir/netqosportal.sql'
  6. Import the uncompressed Event Manager backup file by issuing the following command:
    mysql em -u root -p
    password
    -e 'source $backupDir/em.sql'
  7. Start the
    NetOps Portal
    services on the new system as follows by completing the following steps:
    1. Start the SSO service by issuing the following command:
      • (RHEL 6.x)
        service caperfcenter_sso start
      • (RHEL 7.x/8.x, OL, and SLES)
        systemctl start caperfcenter_sso
    2. Start the event manager by issuing the following command:
      • (RHEL 6.x)
        service caperfcenter_eventmanager start
      • (RHEL 7.x/8.x, OL, and SLES)
        systemctl start caperfcenter_eventmanager
    3. Wait one minute, then start the device manager by issuing the following commands:
      • (RHEL 6.x)
        service caperfcenter_devicemanager start
      • (RHEL 7.x/8.x, OL, and SLES)
        systemctl start caperfcenter_devicemanager
    4. Wait one minute, then start the
      NetOps Portal
      Console service by issuing the following command:
      • (RHEL 6.x)
        service caperfcenter_console start
      • (RHEL 7.x/8.x, OL, and SLES)
        systemctl start caperfcenter_console
  8. Delete the uncompressed archive files to save space by issuing the following command:
    rm netqosportal.sql
    rm em.sql
  9. Log in to
    NetOps Portal
    as an Administrator.
  10. Verify that your configuration data appears in the Admin pages.
Recover from an Upgrade Failure
You can restore the
NetOps Portal
database and verify the database schema version.
Restore the database after an upgrade
only
if a failure occurs. Before attempting to upgrade again, clean up after a failed installation, then complete this procedure.
For more information about how to clean up after a failed installation, see Uninstall
NetOps Portal
.
Follow these steps:
  1. Log in to the server as 'root', or use the 'sudo' account that you configured for the installation.
  2. Stop the
    NetOps Portal
    services by issuing the following commands:
    • (RHEL 6.x)
      Stop the event manager:
      service caperfcenter_eventmanager stop
      Stop the device manager:
      service caperfcenter_devicemanager stop
      Stop the SSO service:
      service caperfcenter_sso stop
      Stop the
      NetOps Portal
      Console service:
      service caperfcenter_console stop
    • (RHEL 7.x/8.x, OL, and SLES)
      Stop the event manager:
      systemctl stop caperfcenter_eventmanager
      Stop the device manager:
      systemctl stop caperfcenter_devicemanager
      Stop the SSO service:
      systemctl stop caperfcenter_sso
      Stop the
      NetOps Portal
      Console service:
      systemctl stop caperfcenter_console
  3. Change to the directory where you saved the backup archive by issuing the following command:
    cd
    backup_Directory
  4. Uncompress the database backup archives for
    NetOps Portal
    and the event manager by issuing the following commands:
    tar zxvf netqosportal.tgz
    tar zxvf em.tgz
  5. Import the uncompressed
    NetOps Portal
    backup file by issuing the following command:
    Leaving out the optional password syntax from the following command prompts you for the password.
    mysql netqosportal -u root -p
    password
    -e 'source $backupDir/netqosportal.sql'
  6. Import the uncompressed event manager backup file by issuing the following command:
    mysql em -u root -p
    password
    -e 'source $backupDir/em.sql'
  7. Change to the following installation directory by issuing the following command:
    cd /opt/CA/PerformanceCenter/Tools/bin
  8. Verify the database version by issuing the following command:
    mysql -P3306 -D netqosportal -u root -p
    password
    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
    DX NetOps Performance Management
    version, follow the steps in the "Recover from an Upgrade Failure with an Error" section.
Recover from an Upgrade Failure with an Error
Follow these steps:
  1. Upgrade the database schema. From the
    Tools/bin
    directory, upgrade the schema to the current version by running the following database utility:
    ./npcshell.sh upgradedb
  2. Import the database translation files by issuing the following commands:
    /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
    password
    -lang en-US /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
    password
    -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
    password
    -lang ja-JP
    Replace the
    password
    variable with the password.
  3. Update the information that
    NetOps Portal
    uses to display administration pages and views by issuing the following commands:
    • 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/
  4. Verify the database version after you have upgraded it by issuing the following command:
    mysql -P3306 -D netqosportal -u root -p
    password
    mysql> select InstallDate, version, dbschemaversion from revision_info order by InstallDate asc;
  5. Start the
    NetOps Portal
    services by issuing the following commands in the order listed:
    • (RHEL 6.x)
      Start the SSO service:
      service caperfcenter_sso start
      Start the event manager:
      service caperfcenter_eventmanager start
      Wait one minute, and then start the device manager:
      service caperfcenter_devicemanager start
      Wait one minute, and then start the
      NetOps Portal
      Console service:
      service caperfcenter_console start
    • (RHEL 7.x/8.x, OL, and SLES)
      Start the SSO service:
      systemctl start caperfcenter_sso
      Start the event manager:
      systemctl start caperfcenter_eventmanager
      Wait one minute, and then start the device manager:
      systemctl start caperfcenter_devicemanager
      Wait one minute, and then start the
      NetOps Portal
      Console service:
      systemctl start caperfcenter_console
  6. Delete the uncompressed archive files to save space by issuing the following commands:
    rm netqosportal.sql rm em.sql
  7. Log in to
    NetOps Portal
    as an administrator.
  8. Verify that your configuration data appears in the Administration pages.
Restore the Single Sign-On Settings
If your
NetOps Portal
deployment uses single sign-on, restore the configuration settings.
Follow these steps:
  1. Restore the following files:
    • /opt/CA/CA/PerformanceCenter/sso/start.ini
    • /opt/CA/CA/PerformanceCenter/PC/start.ini
  2. Restore the follow directories:
    • /opt/CA/CA/PerformanceCenter/sso/webapps/sso/configuration
    • /opt/CA/CA/PerformanceCenter/sso/etc
    • /opt/CA/CA/PerformanceCenter/sso/conf
    • /opt/CA/CA/PerformanceCenter/PC/etc
    • /opt/CA/CA/PerformanceCenter/PC/conf
  3. (If you have enabled HTTPS for
    NetOps Portal
    ) Restore the following files:
    • /opt/CA/CA/PerformanceCenter/sso/start.d/ssl.ini
    • /opt/CA/CA/PerformanceCenter/PC/start.d/ssl.ini
The single sign-on settings are restored.
Restore the Custom Settings
If your deployment includes custom OpenAPI applications, restore the custom settings.
Follow these steps:
  1. Restore the
    /opt/CA/PerformanceCenter/PC/webapps/pc/apps
    directory.
  2. (If you use custom logos for your themes) Restore the following files:
    • /opt/CA/PerformanceCenter/PC/webapps/pc/css/CA-Blue/images/customLogo
    • /opt/CA/PerformanceCenter/PC/webapps/pc/css/CA-Gray/images/customLogo
The custom settings are restored.
Restore Reports
Full PDF reports are temporarily saved for download. Restore the
/opt/CA/PerformanceCenter/DM/repository
directory.
Restore the Script Notification Actions
If you have script notification actions, restore the
/opt/CA/PerformanceCenter/NotificationScripts
directory.
Update the
NetOps Portal
Disaster Recovery Script
If the new
NetOps Portal
hostname is different from the original
NetOps Portal
host, update the data aggregator and the event manager data sources.
Follow these steps:
  1. Open the
    /opt/CA/PerformanceCenter/Tools/bin/update_pc_da_database_references.sh
    NetOps Portal
    disaster recovery script.
  2. On the
    NetOps Portal
    host in the recovery system, update the bold sections of the script to match your system:
    ... ################################################################## # UPDATE THE FOLLOWING PC/DA VARIABLES TO REFLECT NEW ENVIRONMENT ################################################################## NEW_PC_IP_ADDRESS="
    <Recovery/New PC IP Address>
    " NEW_PC_HOSTNAME="
    <Recovery/New PC Hostname>
    " NEW_PC_EVENT_PRODUCER_PORT=
    8181
    NEW_PC_EVENT_PRODUCER_PROTOCOL="
    http
    " # change to "https" if using SSL NEW_DA_IP_ADDRESS="
    <Recovery/New DA IP Address>
    " NEW_DA_HOSTNAME="
    <Recovery/New DA Hostname>
    " NEW_DA_PORT_NUMBER=
    8581
    ...
The data aggregator and event manager data sources are updated.
Restore the
NetOps Portal
Backups
Restore the
NetOps Portal
backups.
Run the
NetOps Portal
Disaster Recovery Script
Run the
/opt/CA/PerformanceCenter/Tools/bin/
your_update_pc_da_database_references.sh
disaster recovery script.
Start
NetOps Portal
Follow these steps:
  1. Start the SSO service by issuing the following command:
    • (RHEL 6.x)
      service caperfcenter_sso start
    • (RHEL 7.x/8.x, OL, and SLES)
      systemctl start caperfcenter_sso
  2. Start the event manager by issuing the following command:
    • (RHEL 6.x)
      service caperfcenter_eventmanager start
    • (RHEL 7.x/8.x, OL, and SLES)
      systemctl start caperfcenter_eventmanager
  3. Wait one minute, then start the device manager by issuing the following commands:
    • (RHEL 6.x)
      service caperfcenter_devicemanager start
    • (RHEL 7.x/8.x, OL, and SLES)
      systemctl start caperfcenter_devicemanager
  4. Wait one minute, then start the
    NetOps Portal
    Console service by issuing the following command:
    • (RHEL 6.x)
      service caperfcenter_console start
    • (RHEL 7.x/8.x, OL, and SLES)
      systemctl start caperfcenter_console
Resynchronize the Event Manager Database
The backup and restore procedures include steps to back up the event manager database. To prevent problems from occurring when the event manager attempts to synchronize with
NetOps Portal
, resynchronize the event manager. The synchronization can fail because
NetOps Portal
has outdated event manager information. The newly-installed event manager includes the new information. If this problem occurs, resynchronize these two databases.
This procedure does not include a step to restore the event manager database. Notifications are not preserved. You must recreate them. Otherwise, the event manager runs normally.
Follow these steps:
  1. Remove the properties that are related to
    NetOps Portal
    from the
    em.general
    database table by issuing the following command:
    DELETE from em.general where Attribute LIKE 'NPC.%';
  2. Restart the event manager by issuing the following command:
    service caperfcenter_eventmanager restart