Performing data backup

To prevent data loss if there’s a service disruption or data corruption, you must backup the data at regular, predefined time intervals. You can trigger a manual backup by using the backup.sh script or you can schedule a backup by setting up a cron job.

Before you begin

  • Ensure that all the third-party database driver JAR files are placed at install_dir/wlp/usr/servers/prdapp/jdbcdrivers/
  • For Excel Connector Sources and Google BigQuery Connector Sources, ensure that the JWT file is placed at the following location:

    install_dir/wlp/usr/servers/prdapp/google/jwt/<file_name>

    Where, install_dir is Cloud Application Business Insights installation location. By default, it is /opt/icabi.

    Note: Only if Cloud Application Business Insights is installed in default location, the backup and restore scripts can back up and restore the driver files.

Procedure

  1. Go to the directory where you installed Cloud Application Business Insights.
  2. Run the backup script by using the following command:
    ./backup.sh /<backup-dir>

    Where, <backup-dir> is the folder where the PRD_Backup folder must be created.

    You can see the output as follows:
    ./backup.sh <backup-dir>
    [INFO]  The backup directory specified is /opt/PRD_Backup.
    [INFO]  Taking backup for PRD database...
    [INFO]  Checking database is running or not......!
    [INFO]  Database is up and running......!
    [INFO]  Started exporting PRD DB......!
    
    [INFO]  Completed exporting of PRD DB and backup is dumped inside /opt/PRD_Backup directory.
    [INFO]  Taking backup for PRD database completed
    [INFO]  Taking backup for PRD UI...
    
    [INFO]  Checking server status...
    [INFO]  Server appears to be running.
    
    [INFO]  Backup successfully complete.
    
    [INFO]  Backup for PRD UI is completed
    [INFO]  backup dir is exist...
    [INFO]  create the tar file of backup directory
    ./
    ./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]  removing existing backup directory..
    

    A PRD_Backup folder is created in the backup-dir directory that contains the PRD_Backup_<HOST_NAME>_<yyyyMMdd>_<HHmmss>.tar file. This TAR file contains the database, connector, and Cloud Application Business Insights application backup.

    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.
    Note: During the backup operation, the Dashboard Designer tool is unresponsive. You can’t modify and save the existing dashboards or create new ones until the operation is complete.

Results

The backup.sh script archives the following files along with dashboard data and connector data in the database:

  • Some configuration files are archived from the following folders:
    • install_dir/wlp/usr/servers/prdauth
    • install_dir/wlp/usr/servers/prdapp
    • install_dir/prd_config
  • Some properties files are archived from install_dir/wlp/usr/servers/prdapp folder:
    • config
    • config/log4j2.xml
    • config/oed_connector_core.properties
    • config/engine_conn_core.properties
    • lib
    • lib/RestFullConf.jar
    • lib/postgresql-42.2.5.jar
    • restapi_t12n
    • server.env
    • bootstrap.properties
    • jvm.options
  • The following files are archived from install_dir/wlp/usr/servers/prdauth folder:
    • basic-registry.xml
    • server.env
    • bootstrap.properties
    • config
    • config/auth_app.properties
    • resources/
    • resources/AES_Encryptor.sh
    • resources/security/
    • resources/security/key.jks
    • resources/security/ltpa.keys
    • jvm.options
  • From prdrtdc folder, the prdrtdc.properties file is archived.
  • From prdutil folder, the config.ini file and /data/importUser folder are archived.
Note: If you added any other files, then you must ensure that you back up and restore those files separately.