Page tree

Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Skip to end of metadata
Go to start of metadata

The following topics provide recommendations for database administration and links to instructions on the MySQL website:

Backing up the existing database

BMC recommends that you make a physical backup of the database data files. The output of a physical backup contains data files that the MySQL server can use directly, resulting in a faster recovery operation.

To create a database backup file

  1. On the computer with the App Visibility portal or collector, navigate to the following directory:
    • (Windows) serverInstallationDirectory\collector\bin\db or serverInstallationDirectory\portal\bin\db
    • (Linux) serverInstallationDirectory/collector/bin/db or serverInstallationDirectory/portal/bin/db
    If the portal and collector are installed on the same computer, they share a database and you only need to perform the procedure in one place.
  2. Run the following script:
    • (Windows) create-mysql-dump.bat
    • (Linux) ./create-mysql-dump.sh

The script creates a backup of the data in the ad-mysql-dump.sql file.

For more information about making MySQL backup files, see Database Backup Methods .

Recovering database data

If you have issues with your database, you can recover the backed-up data file.

To recover the backed up data file

  1. On the computer with the App Visibility portal or collector, log in to the MySQL database as a root user.
    If the portal and collector are installed on the same computer, they share a database and you only need to perform the procedure in one place.
  2. Run the following commands:
    drop database adops_collector
    drop database adops_portal
  3. Navigate to the following directory:
    • (Windows)  serverInstallationDirectory\ADOP_DB\bin
    • (Linux)  serverInstallationDirectory/ADOP_DB/mysql-5.6.14/bin
  4. Run the following script:

    • (Windows) restore-mysql-dump.bat
    • (Linux) ./restore-mysql-dump.sh
  5. Restart the portal and collector services.

The database data is recovered.

For more information about how to recover the MySQL database data, see MySQL backup and recovery methods .

Configuring data retention

Data retention is set during installation of the App Visibility collector. You can change the data retention configuration anytime by changing the values of the following properties in the collector.properties file:

  • retention.time — The period of time, in days, to retain data in the database
  • db.max.size — The maximum size of the database in megabytes (MB). Default: 100000MB = 100GB

Optimizing database tables

To re-index database tables, use the optimize tables script. Due to the way in which App Visibility works with the database, you rarely need to run this script. You should run it only if performance degrades and analysis shows that the reason is fragmented indexes.

Related topics

Upgrading the App Visibility server

Uninstalling the App Visibility server