Restoring the embedded PostgreSQL database


This topic describes how to restore a previously backed-up version of the PostgreSQL database by using the database restore script on the same server. For instructions on restoring the database to a different server, see Migrating-TrueSight-Network-Automation-from-one-server-to-another

The database restore script is located in the tools directory within BCAN_HOME

To restore the embedded PostgreSQL database

  1. Stop the BCA-Networks web server:

    Server OS

    Action

    Microsoft Windows

    As Administrator, go to the Windows Services dialog under Control Panel > Administrative Tasks, and stop the BCA-Networks web server.

    Linux

    As root, enter /etc/init.d/enatomcat stop

  2. Run the Database Restore script.

    Server OS

    Command

    Windows

    restore_db.bat /d <filename>

    Linux

    restore_db.sh -d <filename>

    In the command, <filename> is an optional file name (no path, just file). The default value is bcan.dump.

    The restore operation automatically updates the database to the current release of the installed software.

    Important

    • The database backup file is assumed to be located in the BCAN_DATA\dbbackup or BCAN_DATA/dbbackup directory.
    • Make sure that the keystore.jceks file and the original file from the backup server are the same.
  3. Restart the BCA-Networks web server.

    Server OS

    Action

    Windows

    Go to the Windows Services dialog box under the Control Panel > Administrative Tasks, and start the BCA-Networks web server.

    Linux

    Enter /etc/init.d/enatomcat start

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*