Backup and Restore

This topic describes how to perform backups and restore the Operations Hub database.

Before you begin

You must have Administrator access.

About this task

You can backup and restore Operations Hub versions starting from 1.7 to the current release.
Note: During the execution of backup and restore scripts, all services are stopped. Services start automatically once the backup/restore is complete.

Procedure

  1. Download the PowerShell scripts for backup, restore, and scheduler.
  2. Unzip the downloaded file to access the scripts and jar files.
  3. Perform an Operations Hub backup.
  4. Restore from an Operations Hub backup.
  5. Schedule a backup of Operations Hub.

Back Up the Operations Hub Database

Before you begin

Refer Backup and Restore.

Procedure

  1. Launch Windows PowerShell, and navigate to the location of the backup script file.
  2. Execute BackUp_OperationsHub.ps1 to perform a backup of the UAA, IQP, and WebHMI database.
    The Operations Hub and Proficy Authentication backup zip files are saved to C:\ProgramData. The zip file name also includes the respective backup's datetime in the YYYYMMDD-HHMMSS format.

Restore the Operations Hub Database

Before you begin

It is recommended to take a backup of your current database before continuing with the restore operation. In case you cancel the restore operation, you can recover your current data from the backup.
Note: The restore operation deletes everything from the current system database.

Refer Backup and Restore.

Procedure

  1. Log in to the machine where Operations Hub is installed.
  2. Copy the db-intializer.jar of the version you want to restore to this location: \Program Files\GE\Operations Hub\iqp-tomcat\webapps\site\WEB-INF
    Note: You can skip this step if you are restoring versions 2.1 SIM 2 or later. The jar file is already available at the location.
  3. Launch Windows PowerShell, and navigate to the location of the restore script file.
  4. Enter the absolute path to the Operations Hub and Proficy Authentication backup zip files, and execute Restore_OperationsHub.ps1 to restore the database.
    For example:
    PS C:\Users\Administrator\Desktop> .\Restore_OperationsHub.ps1 C:\ProgramData\OPERATIONS_HUB_BKP_20211013-120559.zip C:\ProgramData\PROFICY_AUTH_2024_BKP_20211013-120559.zip
    The database is restored.

Schedule Operations Hub Database Backup

Before you begin

Refer Backup and Restore.

Procedure

  1. Launch Windows PowerShell, and navigate to the location of the backup scheduler script file.
  2. Execute BackupScheduler_OperationsHub.ps1 to schedule a backup.
    1. To create a scheduler, enter Create.
    2. Enter a name for your backup.
    3. Enter a description of your backup.
    4. Enter Daily to take a backup every day, or Weekly to backup every week.
    5. Enter time in the suggested format to take a daily/weekly backup at the given time.
    6. Enter the location of your backup script.
      For example:
      PS C:\Users\Administrator\Documents\db-backup-restore\Backup_OperationsHub.ps1
      A daily/weekly backup is scheduled.
    1. To delete a scheduler, enter Delete.
    2. Enter the name of the backup for which you want to delete the schedule.
      The daily/weekly schedule for the respective backup is deleted.

Results

The backups are saved to C:\ProgramData.
Troubleshooting:
  • When you run a .ps1 PowerShell script you might get the following message .ps1 is not digitally signed. The script will not execute on the system.
    To fix it you have to run the following command to run Set-ExecutionPolicy and change the Execution Policy setting.
    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
    This command sets the execution policy to bypass for only the current PowerShell session after the window is closed. The next PowerShell session will open running with the default execution policy. “Bypass” means nothing is blocked. No warnings, prompts, or messages are displayed.
  • For LDAP user connectivity, make sure the Active Directory server is accessible to both the servers:
    • the server from where we take the data backup
    • the server to which we restore the data
    If the data restored server cannot access LDAP server, the Invalid Credentials error message appears.