ZCM 24.4 Internal PostgresSQL Upgrade Tips....

https://www.novell.com/documentation/zenworks-24.4/zen_sys_db_mgmt/data/t4q4fsvaxqx8.html

It seems the documentation is a bit lacking so I thought I would post a few quick tips...

  • Check Available Diskspace: df -h /var/opt/microfocus/pgsql/data
  • Check Current Space used by DB:  du -sh /var/opt/microfocus/pgsql/data
  • Make sure Free Space is at least 2x of Used Space. (If even close....I would look at freeing space....)

Make sure to Stop the following services on all ZCM Services except the DB Server. (The script will handle it for the DB Server itself...)

  • systemctl stop microfocus-zenadmin-mgmt.service
  • systemctl stop microfocus-zenclient-mgmt.service
  • systemctl stop microfocus-zenloader.service

Applying the Update....

  • Extract zenworks-postgres-migration-tool-1.zip on your PC and use WinSCP to copy the "postgresql-migration-tool" directory structure to the /tmp folder on your appliance
  • (Edit: Actually I would not use any other subfolder structure than under /tmp.  Only certain folders are exposed to Docker Instances so other locations may be fail.  So be safe and use /tmp.  That is just my personal thought..)
  • By Default, the folder should inherit 0755 permissions to allow the needed script to run...if not update it using WinSCP.  (Copying to folders other than /tmp may not give correct default permissions...)

  • Use Putty to connect to the Appliance Serve Bash prompt and change to the "/tmp/postgresql-migration-tool" directory (Or wherever you copied it....)
  • Run sh postgresql-migration-tool.sh  
  • When prompted for an administrative account, the value will be "Case-Senstive" so the built-in account will be "Administrator" and not "administrator", even though most other places "administrator" will work.
  • This will require a Non-LDAP Based ZCC Admin, since services will not be in a state to verify LDAP based credentials.
  • Don't forget to restart services on other servers after you are done: microfocus-zenworks-configure -c Start
  • It may take longer than normal for the ZCM Services to fully restart the first time after the migration.  If you get a 503 for a while .... just be patient.
  • A few days after all appears well....Cleanup -> /var/opt/microfocus/pgsql/data_old folder

Comment Away and let me know if I missed anything important.....

--

If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

Be sure to "Like" My (and a few others) Cool Solutions below! 

https://community.microfocus.com/members/craigdwilson/bookmarks

  • 0

    Thanks Craig. This is much appreciated. I must admit the documentation had me scratching my head a little.

  • 0

    Good to know - but due to the change in the community website, I had to find that out on my own. But anyway thank you for your valuable input!

    But it would also be great, if that would have found the way into the official documentation.

    And in addition I think, it would be nice to include the necessity, to upgrade the postgresql version of the embedded database with this script before you start the upgrade, in the upgrade documentation.

    I first downloaded the 24.4 update, then added some additional space to the virtual disks, rebooted and started to import the update with zman sui. There I got the error, that the embedded database has the wrong version as it needs a minimum of 16.4 and that I should proceed after having that updated. I then had to search for this utility, as the update documentation had no hint to this script. And even the documentation of the script is more a hole than a documentation. So I had to inspect the script file and the content of the zip-file to come to the method you have described here quite well. And of course I had thought, that the script is correctly marked as executable, if I unzip the zip-file on the appliance itself to find out, that this step has to be done manually, too.

    But after that, the update ran smooth on the primary server and is now rolled out to the devices. The few devices I have updated as a test got no problem till now.

  • 0   in reply to 

    In regards to the Documentation...I did create a Doc Defect to provide more details.  Sometimes when really knowledgeable folks write stuff, they forgot others do not live and breathe the same things and Admins have to be an expert on a myriad of items in the I.T. world.

    --

    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

    Be sure to "Like" My (and a few others) Cool Solutions below! 

    https://community.microfocus.com/members/craigdwilson/bookmarks

  • 0  

    When prompted for an administrative account, the value will be "Case-Senstive" so the built-in account will be "Administrator" and not "administrator", even though most other places "administrator" will work  ---> is one of the most important sentences in the description: Please mark in red

     ./postgres-migration-tool.sh   ----> here also goes sh  postgres-migration-tool.sh I am lazy
    Welcome to the PostgreSQL Database Migration tool.
    PostgreSQL Migration tool running in Migration mode.
    Enter local ZENworks Super Administrator username:
    Administrator
    Enter local ZENworks Super Administrator password:
    *******************
    Running Pre-requisite checks
    Pre-requisite checks passed successfully !!
    Preparing database for backup
    Proceeding with database backup
    Successfully completed database backup. Database backup files are stored at:/var/opt/microfocus/zenworks/common/postgres_dump/dbBackup_
    Preparing database for restore

    zman dgc, gdcs and other commands that output the user and PW for the Postgres are important when you need to communicate directly with the database.

    Thank you for the important information

    “You can't teach a person anything, you can only help them to discover it within themselves.” Galileo Galilei

  • 0 in reply to   

    In fact you need to look into your configuration, what the name of the local administrator is. It is often "Administrator" but you can have any name, which is allowed as administrator. In my installation it is for instance "ZenAdmin"

  • 0   in reply to 

    You just caught me on the wrong foot, the default admin in ZEN is the administrator, additional administrators can be created as non ldap with different roles, but as far as I know the administrator cannot be deleted from ZCM.

    “You can't teach a person anything, you can only help them to discover it within themselves.” Galileo Galilei