APM Plugin backup, restore, repair and cleanup

APM Plugin backup, restore, repair and cleanup

Steps to connect to the database

In order to connect to database, use dbuser instead of postgres user to perform updates to the database.
  1. For read-only queries, submit DB query page or rouser in console can be used.
  2. A prompt to enter password will appear.
  3. Fetch the encrypted password (Copy the value of password key) from <OpManagerHome>/conf/database_params.conf and copy the value of CryptTag from <OpManagerHome>/conf/customer-config.xml files respectively.
  4. To decrypt the password, send the above values to the Support Team (appmanager-support@manageengine.com).
NOTE: PGPASSWORD environmental variable should not be set for the respective command prompt / console. This will prevent the password input request in the console.

You can take a backup of Applications Manager data and restore them back by executing the scripts BackupPGSQLDB.bat/.sh and RestorePGSQLDB.bat/.sh respectively available under <OpManager Home>/AppManager/bin directory.

Steps to back up data in APM Plugin

To take a back up of Applications Manager Plugin data, execute the following commands in the command prompt:

BackupPGSQLDB.bat/.sh

After executing the above command, the output (backup data) would be added in a ZIP file under <OpManager Home>\AppManager\working\backup\ directory in the following format:

...\APM_backupzip_<backupType>_<Table/DB>_<date>_<time>\APM_backupzip_<backupType>_<Table/DB>_<date>_<time>.zip

For example, the ZIP file of the backup would be added under <OpManager Home>\AppManager\working\backup\APM_backupzip_all_dumpDB_pgsql_NORM_14550_Mar_10_2020_17_16_21\APM_backupzip_all_dumpDB_pgsql_NORM_14550_Mar_10_2020_17_16_21.zip file.

Steps to restore backup

To restore the backed up data, execute the following command in command prompt:

RestorePGSQLDB.bat/.sh "<Absolute path of the zip file that was backed up on executing BackupDB script>"

Example:

RestorePGSQLDB.bat/.sh "<OpManager Home>\AppManager\working\backup\APM_backupzip_all_dumpDB_pgsql_NORM_14550_Mar_10_2020_17_16_21\APM_backupzip_all_dumpDB_pgsql_NORM_14550_Mar_10_2020_17_16_21.zip"

Note: Database backup can be taken both in running or shutdown states of Applications Manager.

Steps for repair and clean up

  1. Connect to the database.
  2. Execute the following set of commands:
    VACUUM FULL VERBOSE ANALYZE;
            To Re-index:
            Reindex database AMDB;

                  New to ADSelfService Plus?