Migrating the OEM PostgreSQL Database to an External PostgreSQL Database

2 Likes

If you are using the OEM PostgreSQL database in ZENworks 2017 Update x, then ensure that you migrate to an external PostgreSQL database before upgrading your zone to ZENworks 2020.

Depending on the platform, perform the following steps to migrate to an external PostgreSQL database:

On Linux:

  1. Take a backup of the database.
  2. Stop all services in ZENworks Primary Server.
  3. On the database server, download and extract the migrate_postgres.sh.zip file.
  4. Download and install the PostgreSQL version supported by ZENworks.

If you are planning to upgrade to ZENworks 2020, ensure that you install PostgreSQL 11.4.

  1. Change the permission for the script by running the chmod 755 migrate_script.sh command.
  2. The script log will be saved in the /tmp/migrate_postgres.log location.
  3. Run the following script:

./migrate_postgres.sh -p <PostgreSQL_Installed_Directory> --database <zenworks_db_name> --password <superuser password>

Example: ./migrate_postgres.sh -p /usr/pgsql-11/ --database zenworks_database --password novell

Note:

  1. To see all the available options, run the script without any argument. (Example: ./migrate_postgres.sh)
  2. After migrating to the external PostgreSQL, ensure that you manually clean the OEM PostgreSQL installation.

 

On Windows:

  1. Stop all services in ZENworks Primary Server.
  2. On the database server, download and extract the migrate_postgres.bat.zip file.
  3. Download and install the PostgreSQL version supported by ZENworks.

If you are planning to upgrade to ZENworks 2020, ensure that you install PostgreSQL 11.4.

  1. Open the command prompt as an administrator.

The PostgreSQL upgrade log will be generated in the current directory.

Hence, it is recommended to change the directory to %USERPROFILE% so that PostgreSQL has permission to write logs.

  1. Copy the batch file in the current directory.
  2. The output will be saved at the "%TEMP%\migrate_postgres.log" location.
  3. Run the following command to migrate the database. Specify the database superuser password when prompted:

migrate_postgres.bat -p "<postgresql_install_location"

Example: migrate_postgres.bat -p "C:\Program Files\PostgreSQL\11"

Note:

  1. To see all the available options, run the script without any argument. (Example: ./migrate_postgres.bat)
  2. After migrating to the external PostgreSQL, ensure that you manually clean the OEM PostgreSQL installation.

Labels:

How To-Best Practice
Comment List
Related
Recommended