Migration from PostgreSQL database to PostgreSQL database

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

  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 Start > Run, type services.msc, and click OK. In the Services window, locate the service named ManageEngine Exchange Reporter Plus, and stop it.

  3. Download this zip file and extract it.
  4. After extracting the zip file, copy and paste the pgsqlnew folder to <installation_dir>. Navigate to the <installation_dir\bin> directory and copy over both initpsqlnew.bat and setvcommonenvnew.bat from the extracted zip file.
  5. Go to <installation_dir\bin> and run initpgsqlnew.bat. Once it has completed, run startDB.bat from the same directory.
  6. Navigate to the <installation_dir\pgsqlnew\bin> directory using the Command Prompt and execute the command given below:

    pg_ctl.exe -D ..\data -o "-F -p 33322" start

  7. Go to <installation_dir\bin> and run ChangeDB.bat. When asked, provide a database name of your choice, the username as postgres, and the password as Stonebraker.
  8. After the process has completed, run stopDB.bat from the same directory and close the console.
  9. Navigate to the <installation_dir\pgsqlnew\bin> directory using the Command Prompt and execute the commands given below:
    • psql -U postgres -h 127.0.0.1 -p 33322 -d erp
    • CREATE USER exchangereporter WITH PASSWORD 'AdmanUser@123$'
    • ALTER DATABASE erp OWNER TO exchangereporter
    • ALTER USER exchangereporter WITH NOSUPERUSER CREATEDB REPLICATION
    • GRANT postgres TO exchangereporter
  10. Navigate to <installation_dir\conf> and open customer-config.xml with Notepad++ . Change the value of the StartDBServer parameter to true.
  11. In the same directory, open database_params.conf with Notepad++ and change the value of the username parameter to exchangereporter.
  12. Navigate to the <installation_dir\bin> directory using the Command Prompt and execute the command given below:

    encrypt.bat AdmanUser@123$

  13. Navigate to <installation_dir> and delete the pgsql folder.
  14. Rename the pgsqlnew folder to pgsql.
  15. Restart the product. Check if all the configurations and data from the old Exchange Reporter Plus instance have successfully migrated to the new one.

Copyright © 2024, ZOHO Corp. All Rights Reserved.