Restoring the backup data

After you install Cloud Application Business Insights, if there’s a service disruption or data corruption, then you can use this information to restore a full backup from a specified location. The restore.sh script restores the backup data.

Before you begin

  • Ensure that the <backup-dir> contains the compressed backup folder, PRD_Backup.
  • Ensure that Cloud Application Business Insights application is up and running.
  • If you want to restore data that includes backup data from Cloud Application Business Insights, make sure to install the application on the server.

About this task

The backup contents are restored in Cloud Application Business Insights by using the restore.sh script that is available in install_dir folder.

Where, install_dir is the directory where you installed the application. By default, it is /opt/icabi.

Procedure

  1. Go to the directory where you installed Cloud Application Business Insights.
  2. Run the restore script by using the following command:
    
    cd install_dir
    ./restore.sh /<backup-dir>/PRD_Backup_<HOST_NAME>_<yyyyMMdd>_<HHmmss>.tar
    Where,
    • <HOST_NAME> is the Cloud Application Business Insights hostname.
    • <yyyyMMdd> is day of the year in year-month-day format.
    • <HHmmss> is the time of the day in hour-minute-second format.
    Important: The install_dir must be the same for backup and restore operations.
    You can see the following output:
    ./restore.sh /opt/Backup/PRD_Backup_<HOST_NAME>_<yyyyMMdd>_<HHmmss>.tar
    [INFO]  Provided backup dir is /opt/Backup/PRD_Backup_<HOST_NAME>_<yyyyMMdd>_<HHmmss>.tar./
    ./
    ./prd_db_backup/
    ./prd_db_backup/prd_db_backup.tar
    ./prd_db_backup/prd_db_backup.sql
    ./prd_ui_backup/
    ./prd_ui_backup/prd_ui_backup.tar.gz
    [INFO]  Restoring for PRD database...
    [INFO]  Checking database is running or not......!
    [INFO]  Database is up and running......!
    [INFO]  Started restoring PRD DB......!
    
    [INFO]  Completed restoring of PRD DB
    [INFO]  Restoring for PRD database completed
    [INFO]  Restoring backup for PRD UI...
    [INFO]  Backup File - /opt/Backup/PRD_Backup/PRD_Backup_<HOST_NAME>_<yyyyMMdd>_<HHmmss>/prd_ui_backup/prd_ui_backup.tar.gz
    
    Stopping server prdapp.
    Server prdapp is not running.
    
    Stopping server prdauth.
    Server prdauth is not running.
    
    Stopping PRD DB
    waiting for server to shut down.... done
    server stopped
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    [INFO]  Taking the backup..
    [INFO]  Running untar
    [INFO]  Removing the backup...
    Starting PRD DB
    waiting for server to start.... done
    server started
    
    Starting server prdapp.
    Server prdapp started with process ID 214448.
    
    Starting server prdauth.
    Server prdauth started with process ID 214565.
    [INFO]  server started in  seconds.
    
    [INFO]  Restore complete.
    
    [INFO]  Application restored successfully. Remove the backup dir..
    [INFO]  Backup dir removed.
    

What to do next

If you want to restore your data on a different server, complete the following steps.
  1. Open the bootstrap.properties files from the following location:
    cd install_dir/wlp/usr/servers/prdauth
    vi boostrap.properties
  2. Modify the values of currentServer.hostname, oidc.client1.hostname, and oidc.client1.ip with the hostname or IP address of your server.
  3. Open the bootstrap.properties files from the following location:
    cd install_dir/wlp/usr/servers/prdapp
    vi boostrap.properties
  4. Modify the value of oidc.hostname with the hostname or IP address of your server.
  5. Modify the value of oidc.client1.ip with the IP address of your server.
  6. Restart the Cloud Application Business Insights server.

    For more information, see Restarting the Cloud Application Business Insights server.