Migrating to PgSQL Database from MySQL.


 

ADManager Plus's recent builds have PostgreSQL database bundled in it instead of MySQL. Please follow these steps to migrate the data from your existing ADManager Plus server which has MySQL database to a new installation which has PostgreSQL.

 

1. Follow these steps to migrate ADManager Plus from MySQL to PostgreSQL on the same machine.

  1. Stop ADManager Plus (Go to Start --> All Programs --> ADManager Plus --> Stop ADManager Plus).
    Note: In case you have installed ADManager Plus as an NT Service, stop the service (Go to Start --> Run --> type 'services.msc' and click OK . In the 'Services' window, locate the service named ManageEngine ADManager Plus and stop it.)

  2. Update your current ADManager Plus installation (which has MySQL database) 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 under 'Service Pack Installation Steps'.)

  3. Open the 'database_params.conf' file located in: ADManager Plus Home\conf
    In 'url', change the 'port number' from 33306 to a different one, say 33316 or 33326.

  4. Then, open (in notepad) the 'setCommonEnv.bat' file located in: ADManager Plus Home\bin . Find the text 'DB_PORT' and change the port number assigned to it to the port number which you have mentioned in 'database_params.conf' file in the previous step.

  5. Go to the 'InstallShield Installation Information' folder ( C:\Program Files (x86)\InstallShield Installation Information); add '_bak' as suffix to the folder {CC00BC3F-40AE-49A7-BA63-FE2F93D20585} (That is, {CC00BC3F-40AE-49A7-BA63-FE2F93D20585}_bak).

  6. Download and install the latest version of ADManager Plus. But do not start ADManager Plus after installation [When the installation is complete, uncheck the 'Start ADManager Plus in console mode' option and click 'Finish'.

  7. Open the command prompt using the 'Run as administrator' option, navigate to ADManager Plus Home of new installation\bin and execute the 'startDB.bat' file.

  8. Now, in the old installation, open the command prompt using the 'Run as administrator' option; go to ADManager Plus Home\bin and execute 'changeDB.bat' file.

    • For 'Server Type', select 'PostgreSQL Server'.
    • For 'Host Name', specify 'localhost'.
    • For 'Port', specify '33306'.
    • For 'Database Name', specify 'adsm'.
    • For 'User Name', enter 'postgres' and click 'Test Connection'. If the test connection is successful, click 'Save'.

  9. Once the data migration is complete, open the command prompt with the 'Run as administrator', navigate to : ADManager Plus Home of new installation\bin and execute the 'stopDB.bat' file.

  10. Start the new installation. Check if all the configurations from the old ADManager Plus server have successfully migrated to the new one.

If you need any further assistance or information, please write to our support team (support@admanagerplus.com) or call us (+1 844 245 1108); we will be glad to help you out.

 

 

 

2. Follow these steps to migrate ADManager Plus from MySQL to PostgreSQL on a different same machine

  1. Stop ADManager Plus (Go to Start --> All Programs --> ADManager Plus --> Stop ADManager Plus).
    Note: In case you have installed ADManager Plus as an NT Service, stop the service (Go to Start --> Run --> type 'services.msc' and click OK . In the 'Services' window, locate the service named ManageEngine ADManager Plus and stop it.)

  2. Update your current ADManager Plus installation (which has MySQL database) 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 under 'Service Pack Installation Steps'.)

  3. Download and install the latest version of ADManager Plus on the new server. But do not start ADManager Plus after installation [When the installation is complete, uncheck the 'Start ADManager Plus in console mode' option and click 'Finish'.]

  4. In the new ADManager 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: ADManager Plus Home\pgsql\data. We recommend that you 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 'all' and save the file.
      • In 'postgresql.conf' file, find this text: #listen_addresses = 'localhost'. Replace it with this: listen_addresses = '*' and save the file.
    • Open the command prompt, using the 'Run as administrator' option, and execute the file 'startDB.bat' located in: ADManager Plus Home\bin

  5. Now, in the old ADManager Plus server, open the command prompt, using the 'Run as administrator' option, go to ADManager Plus Home\bin and execute 'changeDB.bat' file.

    • For 'Server Type', select 'PostgreSQL Server'.
    • For 'Host Name', specify ''.
    • For 'Port', specify '33306'.
    • For 'Database Name', specify 'adsm'.
    • For 'User Name', enter 'postgres' and click 'Test Connection'. If the test connection is successful, click 'Save'.

  6. Once the data migration is complete, on the new server, open the command prompt, using the 'Run as administrator' option. Go to ADManager Plus Home\bin and execute 'stopDB.bat'.

  7. Revert the changes that you made in files 'pg_hba.conf' and 'postgresql.conf' located in: ADManager Plus Home\pgsql\data.

  8. Start the new ADManager Plus server. Check if all the configurations from the old ADManager Plus server have migrated to the new one successfully.

If you need any further assistance or information, please write to our support team (support@admanagerplus.com) or call us (+1 844 245 1108); we will be glad to help you out.