Backing up and recovering the App Visibility database
To create an App Visibility database backup file
Make a physical backup of the App Visibility PostgreSQL database to protect your data from loss. The output of a physical backup contains the data files that the App Visibility server can use directly, resulting in a faster recovery operation.
In a high-availability environment, back up your data from the active node to ensure that you have the most up-to-date data.
On the computer with the App Visibility portal or collector, navigate to the following directory:
- (Windows) collector_installationDirectory\collector\bin\db or portal_installationDirectory\portal\bin\db
- (Linux) collector_installationDirectory/collector/bin/db or portal_installationDirectory/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.
If the portal and collector are on separate computers, perform the backup procedure on both components at the same time so that the backup content is consistent. Otherwise, the backup content does not match and the data is incorrect when restored.- Run the following script:
- (Windows) create-pgsql-dump.bat
- (Linux) ./create-pgsql-dump.sh
The script creates a backup of the data in the avdb.dump file in the server component's installationDirectory\ADOP_DB\pgsql\backup directory.
BMC recommends that you move or copy the avdb.dump file outside the installation directory.
To recover the backed up App Visibility data
- Ensure that the avdb.dump file is in the server component's installationDirectory\ADOP_DB\pgsql\backup directory.
Stop the component service:
- On the computer with the App Visibility portal, stop the portal service.
- On the computer with the App Visibility collector, stop the collector service.
For information about stopping services, see Starting-and-stopping-the-App-Visibility-server-services.
Navigate to the following directory, according to your system:
- (Windows) collector_installationDirectory\collector\bin\db or portal_installationDirectory\portal\bin\db
- (Linux) collector_installationDirectory/collector/bin/db or portal_installationDirectory/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.
If the portal and collector are on separate computers, perform the recovery procedure on both components at the same time so that the content is consistent. Otherwise, the content does not match and the data is incorrect when restored.- Run the following script:
- (Windows) restore-pgsql-dump.bat
- (Linux) ./restore-pgsql-dump.sh
- Start the component service.
The database data is recovered.
For more information about how to recover the PostgreSQL database data, see Backup and Restore.