How to migrate external PostgreSQL server keeping the ADSelfService Plus server intact

How to migrate external PostgreSQL server keeping the ADSelfService Plus server intact

Objective   

This article outlines the steps to migrate the ADSelfService Plus application's external PostgreSQL (PGSQL) database to a new PGSQL server, while keeping the existing ADSelfService Plus application server unchanged.

This process is particularly useful when the existing database server is vulnerable or outdated, as migrating to a new server ensures enhanced security and performance. The goal is to achieve a seamless transition of the backend database without disrupting the application layer or its functionality.

Prerequisites   

Before initiating the migration process, ensure the following:
  • Administrative privileges: Administrative access to the ADSelfService Plus application server and both current and new PGSQL servers.
  • PostgreSQL version: The new PostgreSQL server must be running a compatible version (version 12, 13, 14 or 15). Using a significantly different version might lead to compatibility issues.
  • Backup: A complete backup of the ADSelfService Plus installation directory.
  • Network connectivity: The new PGSQL server must have the same firewall exceptions as the old server to ensure uninterrupted communication with the ADSelfService Plus server.
  • Permissions: Database owner privileges to perform backup and restore operations on both PostgreSQL servers, and administrative privileges to execute commands on the ADSelfService Plus application server.
  • Database credentials: The necessary credentials (hostname, port, database name, username, and password) for the new PostgreSQL database.

Steps to follow   

Step 1: Backup the existing PGSQL database
  1. On the old PostgreSQL server, create a full backup of the ADSelfService Plus database using backup tools or with the help of your database administrator.
 
Step 2: Restore the backup on the new PGSQL server
  1. On the new server, restore the backup using PostgreSQL restoration tools or with the assistance of your database administrator.
NotesNote: The master key can only be retrieved from the application server by the support team. If you are prompted to provide a master key, please contact support@adselfserviceplus.com for assistance. 

Step 3: Stop the ADSelfService Plus application
  1. If ADSelfService Plus is running as a service, stop it via Services.msc.
  2. If ADSelfService Plus is running as an application, exit it from the system tray.
 
Step 4: Run the database configuration script
On the ADSelfService Plus application server:
  1. Press the Windows key or click the Start button.
  2. Type cmd or Command Prompt.
  3. Right-click Command Prompt and choose Run as Administrator.
  4. Navigate to the ADSelfService Plus bin directory. By default, this is located in C:\Program Files\ManageEngine\ADSelfService Plus\bin.
  5. Execute the database change script changeDB.bat. This script will launch the Database Configuration Wizard.
  6. In the Database Configuration Wizard, select Pgsql Server from the Server Type dropdown (default option).
  7. Provide the connection details for your new PostgreSQL server.
    • Host Name: The hostname or IP address of the new PostgreSQL server.
    • Port: The port number used by the new PostgreSQL server (e.g., 5432).
    • Database Name: The name of the database that ADSelfService Plus will use on the new server.
    • User Name: The username used to connect ADSelfService Plus to the database.
    • Password: The password for the specified database user.
  1. Click Test to verify the connection with the new server details. If the connection fails, recheck your credentials and network connectivity, then try again.
  2. Once the connection test is successful, click Save.
 
Step 5: Start ADSelfService Plus  
  1. Press Win + R to open the Run dialog box.
  2. Type services.msc and press Enter.
  3. In the Services list, find ManageEngine ADSelfService Plus.
  4. Right-click the service and select Start.

Validation and confirmation   

After completing the migration steps, perform the following to confirm success:
  1. Application launch: Ensure the ADSelfService Plus application starts successfully without any database connection errors.
  2. Data verification:
    • Log in to the ADSelfService Plus portal.
    • Verify data consistency by checking reports and the dashboard.
  1. Functionality test:
    • Perform a few common user self-service operations (e.g., password reset, account unlock).
    • Test administrator functionalities (e.g., managing policies).
  1. Log files check: Review the ADSelfService Plus server logs located in <ADSelfService Plus_Installation_Dir>\logs for any database connectivity issues or errors related to the migration.

How to reach support                             

If the issue persists, contact our support team here

                  New to ADSelfService Plus?

                    • Related Articles

                    • Migration from PostgreSQL database server to MS SQL

                      ADSelfService Plus comes bundled with a PostgreSQL database server to store basic user attributes and enrollment data. It also allows you to migrate from the built-in PostgreSQL to MS SQL. This guide will walk you through the database server ...
                    • How to migrate the ADSelfService Plus installation from one machine to another

                      Description This article will guide you through the process for migrating the ADSelfService Plus installation from one machine to another. Important: Before you start the migration process, please update your ADSelfService Plus installation to the ...
                    • Migrating from ADSelfService Plus 32-bit to ADSelfService Plus 64-bit

                      This article will help you migrate from ADSelfService Plus 32-bit version to the 64-bit version. Before you begin 32-bit to 64-bit migration is possible only between the same builds. For example, you cannot migrate from a 32-bit version of build 5310 ...
                    • Configuring high availability in ADSelfService Plus

                      ADSelfService Plus utilizes automatic failover to support high availability in case of system and product failures. Essentially, this means that when the ADSelfService Plus service on one machine fails, another instance of ADSelfService Plus running ...
                    • Encryption and data storage in ADSelfService Plus database

                      Encryption in the ADSelfService Plus database ADSelfService Plus' database uses the following encryption methods to store sensitive data: Database Encryption method PostgreSQL AES-256-CBC Microsoft SQL AES-256-CBC The following sensitive information ...