How to upgrade the bundled PostgreSQL database in ADSelfService Plus
Last updated on:In this article
Objective
This article explains how to upgrade the bundled PostgreSQL database in ADSelfService Plus by updating ADSelfService Plus to the required target build, installing a fresh 64-bit instance of the same build on the same server, and restoring the updated database to the fresh installation.
Use this procedure when the target ADSelfService Plus build includes a newer bundled PostgreSQL version and updating the application alone does not upgrade the existing bundled PostgreSQL database.
Do not independently replace or upgrade the PostgreSQL binaries in the ADSelfService Plus installation directory.
Prerequisites
Before you begin, make sure that:
- You have domain or local administrator privileges on the server hosting ADSelfService Plus.
- The deployment is a standard single-server installation that uses the built-in PostgreSQL database. This procedure does not apply to an external PostgreSQL, Microsoft SQL Server, or MySQL database.
- You have scheduled a maintenance window. ADSelfService Plus will be unavailable while the product is stopped, backed up, and updated.
- The initPgsql.bat and UpdateManager.bat files are not blocked by Active Directory Group Policy or antivirus software.
If your update path includes ADSelfService Plus build 7001 and above, the installation must be 64-bit. Migrate a 32-bit installation to 64-bit before applying build 7001 and above.
Steps to upgrade the bundled PostgreSQL database
Step 1: Verify the database type and current versions
- Open the ADSelfService Plus installation directory. The default location is C:\Program Files\ManageEngine\ADSelfService Plus.
- Open the conf folder and open database_params.conf in a text editor.
- Confirm that ADSelfService Plus is using the built-in PostgreSQL database. If the deployment uses an external database, stop and use the update procedure applicable to that database.
- Log in to the ADSelfService Plus admin portal and note the current product build number.
- Open Command Prompt as an administrator and navigate to <installation-directory>\pgsql\bin.
- Run the following command to identify the current PostgreSQL version:
postgres.exe -V
- Record the PostgreSQL version so you can compare it after the update.
Step 2: Stop ADSelfService Plus and prepare the built-in PostgreSQL database
- Stop ADSelfService Plus.
- If ADSelfService Plus runs as a Windows service, open services.msc and stop the ManageEngine ADSelfService Plus service.
- If ADSelfService Plus runs as an application, locate its icon in the Windows notification area (system tray) and stop the application.
- Open Command Prompt as an administrator and navigate to <installation-directory>\bin.
- Stop the built-in PostgreSQL database by running stopDB.bat.
- Run the following script using the privileges of the ADSelfService Plus service account where possible. If that account cannot be used to open Command Prompt, use another domain or local administrator account and use the same account to run UpdateManager.bat later.
initPgsql.bat
Step 3: Back up the database and installation files
- From the elevated Command Prompt session in <installation-directory>\bin, run the following:
backupDB.bat
- Confirm that the database backup is created in the Backup folder under the ADSelfService Plus installation directory and copy the backup to a safe location. Record the exact backup file name. You need it to determine the restore password.
Note:
Current backups use the OfflineBackup_<timestamp>.ezip naming format. For example, OfflineBackup_20250813160300.ezip uses 00306131805202_pukcaBenilffO as its default restore password. The password is the backup file name reversed, excluding .ezip, and is case-sensitive.
- Back up ADSelfService Plus by creating a copy or ZIP archive of the complete ADSelfService Plus installation directory.
If you use an administrator-configured database backup password and have forgotten it, contact the ADSelfService Plus support team before continuing. The support team can help you recover it using customer-config.xml from the conf folder.
Step 4: Update ADSelfService Plus to the target build
- From an elevated Command Prompt session in <installation-directory>\bin, run the following:
UpdateManager.bat
- In the Update Manager, click Browse and select the required ADSelfService Plus PPM service pack.
- Click Install.
- Wait for the update to finish. Do not close the Update Manager or terminate the update process while the service pack is being installed.
- After the update finishes, click Close > Exit.
- Start ADSelfService Plus and log in to the admin portal.
- Confirm that the expected target build is displayed.
If the Update Path Finder requires multiple service packs, apply them in the specified order. Do not skip intermediate updates.
Step 5: Create a database backup at the target build
After ADSelfService Plus has been updated to the target build, create a fresh database backup. Use this backup, not the backup from Step 3, when you restore the database to the fresh 64-bit installation.
- Stop ADSelfService Plus.
- If ADSelfService Plus runs as a Windows service, open services.msc and stop the ManageEngine ADSelfService Plus service.
- If it runs as an application, stop it from the Windows notification area (system tray).
- Open Command Prompt as an administrator and navigate to <installation-directory>\bin.
- Run the following:
backupDB.bat
- Confirm that the backup is created in the Backup folder under the ADSelfService Plus installation directory.
- Record the exact backup file name and make sure the corresponding backup password is available.
Note:
The default password is the backup file name reversed, excluding .ezip. For example, OfflineBackup_20250813160300.ezip uses 00306131805202_pukcaBenilffO.
- Make a folder-level backup (a copy or ZIP archive) of the complete ADSelfService Plus installation directory and store it safely.
The fresh 64-bit installation and the installation from which this backup is created must run the same ADSelfService Plus build.
Step 6: Install a fresh 64-bit ADSelfService Plus instance on the same server
- Back up the installer metadata folder, C:\Program Files (x86)\InstallShield Installation Information\{09998EF9-DF8C-4E52-803D-4AE85D38DD2B}, if it belongs to the existing ADSelfService Plus installation.
- After backing it up, delete only this folder.
Important:
Do not delete the existing ADSelfService Plus application directory.
- Confirm that you have saved the database backup from Step 5, the complete installation directory backup, and the copy of the installer metadata folder.
- Install the 64-bit version of ADSelfService Plus for the target build recorded in Step 4.
Note:
If the required 64-bit installer is not available for downloading, contact the ADSelfService Plus support team.
- After the installation, stop the fresh 64-bit ADSelfService Plus instance before restoring the database.
Step 7: Prepare the fresh installation for database restoration
- Copy customer-config.xml from the existing ADSelfService Plus installation and rename the copied file to new-customer-config.xml.
- Place new-customer-config.xml in the conf folder of the fresh 64-bit installation.
Do not delete or overwrite the customer-config.xml created by the fresh 64-bit installation. Both customer-config.xml and new-customer-config.xml must be present in the conf folder during database restoration.
Step 8: Restore the database
- Copy the EZIP database backup created in Step 5 to the bin folder of the fresh 64-bit installation.
- Open Command Prompt as an administrator.
- Navigate to the bin folder.
- Run the following:
restoreDB.bat <backup-file-name>.ezip -p <password> true
For example:
restoreDB.bat OfflineBackup_20250813160300.ezip -p 00306131805202_pukcaBenilffO true
- Wait for the database restoration to finish.
Step 9: Restore the remaining configuration and customization files
- Copy ZohoCreator.properties from the previous installation to the conf folder of the fresh 64-bit installation.
- Restore the applicable files and folders backed up from the previous installation:
- Restore the patch folder to the ADSelfService Plus installation directory, if applicable.
- Restore the resources folder to the ADSelfService Plus installation directory.
- Restore the html, images, resources, and styles folders to webapps\adssp.
- Restore server.xml, web.xml, and the SSL keystore to the conf folder.
- Restore the MPM folder to the ADSelfService Plus installation directory.
Do not replace the fresh installation's entire conf folder with the one from the previous installation.
Step 10: Configure ADSelfService Plus as a Windows service
The migrated 64-bit installation must run as a Windows service. If the service is not installed, perform the installation steps below.
- Open Command Prompt as an administrator.
- Navigate to the bin folder in the ADSelfService Plus installation directory.
- Run the following:
InstallNTService.bat
- Open services.msc.
- Open the properties of the ManageEngine ADSelfService Plus service.
- On the Log On tab, configure the service account required by your deployment.
- Start the service.
Step 11: Apply the license
- Back up the source lib\adventnetlicense.xml file, if present, for your records. This is the stored license file name after application.
- In the destination ADSelfService Plus admin portal, click License > Browse and select your original license.xml file.
- Click Upgrade and verify that the expected edition and licensed user count are displayed.
Step 12: Start ADSelfService Plus
- Start ADSelfService Plus. Open services.msc and start the ManageEngine ADSelfService Plus service.
- Log in to the ADSelfService Plus admin portal and confirm that the expected target build is displayed.
Step 13: Verify the bundled PostgreSQL version
- Open Command Prompt as an administrator and navigate to <installation-directory>\pgsql\bin.
- Run the following:
postgres.exe -V
- Compare the displayed PostgreSQL version with the bundled PostgreSQL version specified for the target ADSelfService Plus build. If the versions do not match, do not replace the PostgreSQL binaries manually. Contact the ADSelfService Plus support team for the build-specific database upgrade procedure.
Best practices
- Make a fresh database backup immediately before each service pack update in the supported path.
- Keep a folder-level backup of the complete ADSelfService Plus installation directory until the target build and PostgreSQL version are fully validated.
- Do not interrupt the Update Manager while a service pack is being installed.
- Do not independently install, replace, or overwrite PostgreSQL binaries inside the ADSelfService Plus installation directory.