Backing up and recovering the App Visibility database
This topic provides general instructions for backing up and recovering the App Visibility database. Periodically make a physical backup of the database files to protect against loss.
Backing up the App Visibility database
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.
To create an App Visibility database backup file
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_InstallationDirectory\ADOP_DB\pgsql\backup\ directory.
For more information about making database backup files, see Backup and Restore.
Recovering the App Visibility database data
If you have issues with your database, you can recover the backed-up data file.
To recover the backed up App Visibility data file
- 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
- Enter the superuser password.
The database data is recovered.
For more information about how to recover the PostgreSQL database data, see Backup and Restore.
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
Related topics
Backing-up-and-recovering-App-Visibility-agent-policy-files
Upgrading-the-App-Visibility-server
Uninstalling-the-App-Visibility-server
Changing-the-App-Visibility-database-password
See also (Version 10.0) Backing up and recovering data for a MySQL database