Understanding tools and scripts
The BCAN_HOME/tools directory contains a variety of scripts for maintaining the BMC Network Automation system. Each of these scripts has corresponding .sh scripts for Linux and .bat scripts for Microsoft Windows. Any differences in command-line parameters or functionality are noted.
Some of the scripts are included only with installations that use the embedded PostgreSQL database. These scripts are noted. Scripts, their syntax, and descriptions are listed in the following table:
Tools and scripts
Script | Syntax and description |
---|---|
backup_db.sh backup_db.bat |
|
create_db.sh create_db.bat |
|
create_guid.sh create_guid.bat |
|
create_keystore.sh create_keystore.bat |
|
ena_control.sh ena_control.bat |
|
export_keystore.sh export_keystore.bat |
|
import_users.sh import_users.bat |
|
init_dbms.sh init_dbms.bat |
Warning Running this script erases all existing data in the database. This script re-creates the entire BMC Network Automation database. After running init_dbms, run restore_db or populate_db to create the database tables and data.
|
populate_db.sh populate_db.bat |
|
query_db.sh |
|
reset_password.sh reset_password.bat |
To change all user account passwords, run the script as follows: |
restore_db.sh |
This script is applicable for embedded PostgresSQL only. It restores a previously backed-up copy of your database. If the backed-up version is not the same as the current application version, the restore script also performs an update by running the upgrade_db script (described below). All stored reports are deleted from the resulting database. This script takes two parameters.
Note: Stop the BCA-Networks web server before running this script. Warning Do not use this script to restore a database that was backed up in versions prior to 8.3.00. Otherwise, unexpected failures could occur. You need to first upgrade to BMC Network Automation version 8.3.00 and then to version 8.9.x. |
upgrade_db.sh upgrade_db.bat | This script performs an upgrade of the database tables to align with the version of the BMC Network Automation software that is installed on your system. If the database tables are set up for the same version as the current version of the BMC Network Automation software that is installed, the script exits silently. If the database tables are set up for a version newer than the version of the BMC Network Automation software that is installed, the script displays an error. Note that all stored reports are deleted by this script. This script works with the embedded PostgreSQL database and distributed Oracle, SQL Server, and PostgreSQL databases. Warning Do not use this script to upgrade a database that was backed up in versions prior to 8.3.00. Otherwise, unexpected failures could occur. You need to first upgrade to BMC Network Automation version 8.3.00 and then to version 8.9.x. |
The following files in BCAN_HOME/tools are used by the installation process or invoked indirectly. Do not run these scripts. Each script comes in a .sh and .bat version.
- create_system_parameter.sh
- create_user.sh
- enable_custom_actions.sh
- setenv.sh
- setenv_db.sh
- publish_services.sh
- pg_ctl_start.sh
- pg_ctl_wrapper.sh
- start_service.sh
- initdb_wrapper.sh
- generate_import_schema.sh .
- import_csm_artifacts.sh
- validate_db.sh
Comments