How to upgrade PostgreSQL in ADManager Plus in the same server

How to upgrade PostgreSQL in ADManager Plus in the same server

Objective 

This article explains how to upgrade the bundled PostgreSQL database in ADManager Plus to the latest supported version in order to improve performance, enhance data security, and ensure compatibility with newer ADManager Plus builds. This is especially useful during version upgrades or when preparing the product for long-term stability in enterprise environments.

Prerequisites  

  • Ensure the ADManager Plus installation directory is excluded from antivirus scans.

  • Create a full backup of the installation folder or take a server snapshot before starting the upgrade process.

Steps to follow  

Case 1: Steps to upgrade PostgreSQL for ADManager Plus (Build 7230 or later)   

Step 1: Stop ADManager Plus

    • Go to Start > ADManager Plus > Stop ADManager Plus.

    • If ADManager Plus is running as a Windows service, stop it via Start > Run > services.msc > ManageEngine ADManager Plus > Stop.

    • If high availability is enabled, also stop the ManageEngineADManagerPlusPostgres service from the Services Console.

Step 2: Back up the database

    1. Open Command Prompt as administrator.

    2. Navigate to \<Installation_Dir>\ADManager Plus\bin and run backupDB.bat.

    3. A backup folder will be created inside the installation directory containing your database backup (e.g., OfflineBackup_<timestamp>.ezip).

    4. The backup file is protected using the CryptTag value from the customer-config.xml file found in the <conf> directory.

Step 3: Download and upgrade PostgreSQL v15.6

    1. Download PostgreSQL 15.6.

    2. In the ADManager Plus installation directory, create a new folder named NewPgsql.

    3. Move the downloaded PostgreSQL ZIP file into this NewPgsql folder.

    4. Navigate to \<Installation_Dir>\ADManager Plus\bin and execute upgradePG.bat.

Step 4: Restart ADManager Plus

    1. Launch the application via Start > ADManager Plus > Start ADManager Plus.

 Case 2: Steps to upgrade PostgreSQL for ADManager Plus (Builds below 7230)   

Step 1: Stop ADManager Plus

    • Go to Start > ADManager Plus > Stop ADManager Plus.

    • If running as a Windows service, stop it via Start > Run > services.msc > ManageEngine ADManager Plus > Stop.

Step 2: Back up the database

    1. Open Command Prompt as administrator.

    2. Navigate to \<Installation_Dir>\ADManager Plus\bin and run backupDB.bat.

    3. A Backup folder will be created in the installation directory, containing the database backup (e.g., OfflineBackup_<timestamp>.ezip).

    4. The backup file is password-protected using the CryptTag value, which can be found in the customer-config.xml file located in \<Installation_Dir>\ADManager Plus\conf.

Step 3: Copy configuration and data files

From your current installation directory, copy the following:

    1. Archive, ES, and esdata folders.

    2. customer-config.xml file from the conf folder.

Step 4: Prepare for reinstallation (if using the same server)

    1. Navigate to C:\Program Files (x86)\InstallShield Installation Information

NotesNote: Enable Hidden Items in File Explorer if not visible.

    1. Rename the folder:
      CC00BC3F-40AE-49A7-BA63-FE2F93D20585 to
      CC00BC3F-40AE-49A7-BA63-FE2F93D20585_bak.

    2. Go to C:\Program Files\ManageEngine (or your installation path) and rename the existing ADManager Plus folder to ADManager Plus_old.

Step 5: Reinstall the same build

    1. Download the same ADManager Plus build version used previously.

    2. Run the installer but do not start the application after setup. Uncheck Start ADManager Plus in console mode in the final step.

Step 6: Restore configuration and data files

    1. Paste the previously copied Archive, ES, and esdata folders into the new installation directory.

    2. Replace the new customer-config.xml with your original one.

    3. Copy your backup file (e.g., OfflineBackup_<timestamp>.ezip) into the bin folder of the new installation.

Step 7: Restore the database

    1. Open Command Prompt as administrator.

    2. Navigate to \<Installation_Dir>\ADManager Plus\bin.

    3. Run the following command:
      restoreDB.bat <backup_file_name> -p
      Example: restoreDB.bat OfflineBackup_20230215191814.ezip -p

    4. When prompted, use the CryptTag value from your original customer-config.xml as the password (unless a different password was set in ADManager Plus, Admin > General Settings > Security and Privacy > Privacy Settings).

Step 8: Start ADManager Plus and apply your license

    1. Launch the product using the Start menu or Service Manager.

    2. Reapply your license file. Use the original file sent to your email from licensing@manageengine.com, or retrieve it from the old instance’s lib directory as AdventNetLicense.xml.

 Case 3: Upgrading the database in older builds of ADManager Plus (Builds older than 7140)   

Step 1: Stop ADManager Plus and its database  

    • Go to Start > All Programs > ADManager Plus > Stop ADManager Plus.

    • If ADManager Plus is installed as a Windows service, open Run > services.msc, find ManageEngine ADManager Plus, and click Stop.

    • To stop the database, navigate to \<Installation_Dir>\ADManager Plus\bin and run StopDB.bat.

Step 2: Back up the existing database  

    1. Go to \<Installation_Dir>\ADManager Plus\bin, right-click backupDB.bat, and select Run as administrator.

    2. This will generate a backup in a folder named Backup located inside the installation directory (e.g., OfflineBackup_20230215191814.ezip).

Step 3: Copy configuration files

From your current installation directory, copy the following:

    1. The Backup folder with the database backup (OfflineBackup_*.ezip)

    2. Archive, ES, and esdata folders.

Step 4: Prepare for a fresh installation  

    1. In File Explorer, enable Hidden items (View > Show > Hidden items).

    2. Navigate to C:\Program Files (x86)\InstallShield Installation Information and rename the folder CC00BC3F-40AE-49A7-BA63-FE2F93D20585 to CC00BC3F-40AE-49A7-BA63-FE2F93D20585_bak.

    3. Rename your existing installation folder (e.g., ADManager Plus to ADManager Plus_old).

Step 5: Download and install the required build  

    1. Download the required ADManager Plus build version and install it on the same server.

    2. After installation, launch the product once in console mode, then close it by right-clicking the system tray icon > Stop ADManager Plus.

Step 6: Paste configuration files  

Paste the previously copied Archive, ES, and esdata folders into the new installation directory.

    1. Place the backup file in \<New_Installation_Dir>\ADManager Plus\bin

    2. Place the Archive, ES, and esdata folders in the root of the new installation directory

Step 7: Restore the database  

    1. Open Command Prompt as the ADManager Plus service account.

    2. Navigate to the bin folder, cd <drive letter>:\<New_Installation_Dir>\ADManager Plus\bin

    3. Run the restore command:

      Info
      restoreDB.bat <backup_file_name> -p

Example: restoreDB.bat OfflineBackup_20210116225934.ezip -p

NotesNote: The backup file is password protected. Use the reverse of the backup file name as the password. For example, for OfflineBackup_20210116225934.ezip, the password would be 43952261101202_pukcaBenilffO

Step 8: Reinstall ADManager Plus as a service  

    1. From the same Command Prompt window, run wrapper.exe -i ..\conf\wrapper.conf

Step 9: Start ADManager Plus

    1. Open Run > services.msc

    2. Locate ManageEngine ADManager Plus and click Start

Step 10: Apply the license   and SSL certificate

    1. Copy the license file AdventNetLicense.xml from the old instance’s bin\license folder. Apply it to the new instance.

    2. If an SSL certificate was configured previously, reapply it using the SSL Certificate Tool. 

 Tips 

  • Perform the upgrade in a test environment before applying it to the production server.

  • Retain the old instance until you’ve verified that the new setup works as expected.

  • Plan the upgrade during a scheduled maintenance window to reduce disruption.

  • Keep a record of each step for future troubleshooting or reference.

                  New to ADSelfService Plus?

                    • Related Articles

                    • ADManager Plus upgrade failure

                      Issue description Upgrade failure occurs when background processes from the ADManager Plus installation folder are still running. During an upgrade, if files within the installation directory are being accessed by other processes, the upgrade may ...
                    • How to upgrade the PostgreSQL database in ADManager Plus on a new server

                      Objective This article explains how to upgrade the bundled PostgreSQL database in ADManager Plus to the latest supported version on a new server. Performing this upgrade helps improve performance, strengthen data security, and ensure compatibility ...
                    • How to update ADManager Plus' built-in PostgreSQL database

                      Steps to update your ADManager Plus instance's PostgreSQL database Stop ADManager Plus by navigating to Start > All Programs > ADManager Plus > Stop ADManager Plus. Note: If you have installed ADManager Plus as a Microsoft Windows service, stop the ...
                    • Unable to start ADManager Plus

                      Issue description ADManager Plus may sometimes fail to start, either displaying an error message while initiating as a console or stopping unexpectedly during the startup process. This issue can disrupt administrative tasks and delay critical ...
                    • FAQ: Compatibility of ADManager Plus with SQL Server 2022

                      This FAQ article answers common questions about the compatibility of Microsoft SQL Server 2022 with ManageEngine ADManager Plus. As many IT teams plan upgrades to SQL 2022 for better performance and features, it’s essential to ensure that your ...