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 <Applications Manager Home>/bin directory.
To take a back up of Applications Manager 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 <Applications Manager Home>\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 C:\Program Files\ManageEngine\AppManager14\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.
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 "C:\Program Files\ManageEngine\AppManager14\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.
You can also choose to filter out specific data while taking backup of Applications Manager using the command given below:
BackupPGSQLDB.bat <Runtime command of required data>
By using specific runtime commands, you can choose to take backup for the required data and filter out unnecessary ones. Below are the list of data and their corresponding runtime commands:
Backup Data | Runtime Command |
---|---|
Complete database alone | --database |
Only Configuration files | --confiles |
Only Report tables | --reports |
Only Configuration tables | --configtables |
Exclude Report tables | --exclude-reports |
Exclude Poll Data tables | --exclude-raw |
Example 1:
To take backup of report data, command should be executed as follows:
BackupPGSQLDB.bat --reports
Example 2:
To backup and restore the Configuration files and Configuration tables, follow the steps given below:
Note: In Enterprise Edition, backup of report or configuration data (like --reports, --configtables, --exclude-reports, --exclude-raw) taken from one server should not be restored in another server.
You can configure a backup task with Task Scheduler as follows:
Program/Scripts: <Applications Manager Home>\bin\BackupPGSQLDB.bat
Start In: <Applications Manager Home>\bin\
Program/Scripts: <Applications Manager Home>\bin\BackupPGSQLDB.bat
Start In: <Applications Manager Home>\bin\
Note: Users should not use the SQL Server Import and Export Wizard to perform backup or restore of Applications Manager database.