Migrating from MySQL database to PostgreSQL server

Please follow the below steps to migrate data from your existing Exchange Reporter Plus server, which has MySQL database to a new installation that has PostgreSQL.

Steps to migrate Exchange Reporter Plus data from MySQL to PostgreSQL on the same machine.

  1. Stop Exchange Reporter Plus (Click Start and search for Exchange Reporter Plus. Click Stop Exchange Reporter Plus).
  2. Note: In case you have installed Exchange Reporter Plus as an NT Service, stop the service by clicking on Start → Run, type services.msc, and click OK. In the Services window, locate the service named ManageEngine Exchange Reporter Plus, and stop it.

  3. Update your current Exchange Reporter Plus installation (which has MySQL database) to the latest version by applying the latest service pack. You can download the service pack here. Check out the service pack installation steps here.
  4. Open the database_params.conf file located in: Exchange Reporter Plus installation directory\conf
  5. In the URL, change the port number from 33309 to a different one, say 33319 or 33329.
  6. Open the setCommonEnv.bat file located in: Exchange Reporter Plus installation directory\bin using Notepad. Find the text DB_PORT, and change the port number to the one had mentioned in Step 4.
  7. Go to the InstallShield Installation Information folder (C:\Program Files (x86)\InstallShield Installation Information); add _bak as suffix to the folder {CCB34152-8A6B-4442-8713-48E2F437E548}(That-is, {CCB34152-8A6B-4442-8713-48E2F437E548}_bak).
  8. Download and install the latest version of Exchange Reporter Plus. When the installation is complete, uncheck the Start Exchange Reporter Plus in console mode box, and click on Finish.
  9. Open the command prompt as an administrator, navigate to the new Exchange Reporter Plus installation directory\bin, and start the DB alone by executing the startDB.bat file.
  10. Now, in the old installation directory, open the command prompt as an administrator; go to Exchange Reporter Plus\bin and execute the changeDB.bat file.
    • For Server Type, select PostgreSQL Server.
    • For Host Name, specify localhost.
    • For Port Number, specify 33309.
    • Choose Yes for Migrate Data.
    • For Database Name, specify erp, and click Test Connection. If the test connection is successful, click Save.
  11. Once the database migration is complete, execute stopDB.bat in the command prompt window opened in Step 8.
  12. Start the new installation. Check if all the configurations and data from the old Exchange Reporter Plus instance have successfully migrated to the new one.

Steps to migrate Exchange Reporter Plus from MySQL to PostgreSQL on a different machine

Note: In case SSL was enabled in the old instance, we need to copy the existing SSL configuration to the new instance. Copy the server.xml and web.xml files from the \conf folder from the old server and paste them in the same location in the new server.

  1. Stop Exchange Reporter Plus (Click Start and search for Exchange Reporter Plus. Click on Stop Exchange Reporter Plus).
  2. Note In case you installed Exchange Reporter Plus as an NT Service, stop the service (Start > Run, type services.msc and click OK. In the Services window, locate the service named ManageEngine Exchange Reporter Plus, and stop it.)

  3. Update your current Exchange Reporter Plus installation (which has MySQL database - Exchange Reporter Plus build 4142 and below) to the latest version by applying the latest service pack. (You can download the service pack from here, and apply it using the steps mentioned below in the Service Pack Installation Steps section).
  4. Download and install the latest version of Exchange Reporter Plus. When the installation is complete, uncheck the Start Exchange Reporter Plus in console mode option, and click Finish.
  5. In the new Exchange Reporter Plus server:
    • Enable remote connection in PostgreSQL database server by making the following changes in the pg_hba.conf and postgresql.conf files located in: New Exchange Reporter Plus installation directory\pgsql\data. We recommend you to backup these files before modifying them.
    • In pg_hba.conf file, under the heading IPv4 local connections, replace the IP address  127.0.0.1/32 with the IPs of all your servers, and save the file.

      In postgresql.conf file, find this text: #listen_addresses = 'localhost'. Replace it with:  listen_addresses = 'Destination IP address' and save the file.

  6. Open Command Prompt as administrator, navigate to the New Exchange Reporter Plus installation directory\bin, and start the DB alone by executing the startDB.bat file. Now, in the Old Exchange Reporter Plus server, open Command Prompt as an administrator, go to Exchange Reporter Plus installation directory/bin, and execute the changeDB.bat file.
    • For Server Type, select PostgreSQL Server.
    • For Host Name, specify the new Exchange Reporter Plus host name (Eg: consto-dc1).
    • For Port Number, specify 33309.
    • Choose Yes to migrate the data.
    • For Database Name, enter erp, and click Test Connection. If the connection test is successful, click Save.
  7. Once the database migration is complete on the new server, execute stopDB.bat in the Command Prompt window opened in Step 5.
  8. Revert the changes that you made in files pg_hba.conf and postgresql.conf located in New Exchange Reporter Plus installation directory\pgsql\data.
  9. If the archive path configured in the old Exchange Reporter Plus machine is not a shared location, copy the archived files from the old Exchange Reporter Plus machine to the same path in the new Exchange Reporter Plus machine.
  10. Start the new Exchange Reporter Plus server. Check if all the configurations and data from the old Exchange Reporter Plus server has migrated to the new one successfully.

Copyright © 2021, ZOHO Corp. All Rights Reserved.