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?

                    • Related Articles

                    • Upgrade guide for OpManager v 12.7 and APM Plugin

                      After downloading the service pack for OpManager and the compatible service pack for Applications Manager Plugin (APM Plugin) to OpManager installed server, start the upgrade process for OpManager and APM Plugin by following the steps below: Note: If ...
                    • Troubleshooting Applications Manager Plugin database migration failure after service pack upgrade of OPM and APM plugin

                      When upgrading OpManager from version 12.6.xxx to 12.7.xxx and updating the APM Plugin to 1651x, particularly when using Postgresql as the backend database, an essential one-time migration occurs. This migration involves moving our backend Postgresql ...
                    • APM Plugin Migration

                      How do I migrate Applications Manager plugin installed in one machine to a different machine? 1. First migrate the OpManager from the old server to the new server with same backend database. 2. Install Applications Manager plugin in the new server ...
                    • APM Plugin migration from 32-bit to 64-bit installation

                      To migrate APM Plugin from 32-bit to 64-bit installation, follow the steps given below: Perform a database backup of the 32-bit APM Plugin setup and place it anywhere outside the Applications Manager folder directory. Make sure to take a VM snapshot ...
                    • Migrate from Standalone APM server to Plugin server

                      Please note that these steps can be followed only if your OpManager version is 127104 or above. Migration Steps from Standalone Server To Plug-In Server: In the standalone server, go to AppManager\bin directory and run BackupConfig.bat\.sh file to ...