13.2 Restoring Backed-up Files and Database on the Appliance server

NOTE:

  • You can migrate one server at a time. Before migrating the server, ensure that you make a note of all the roles and services (example: Database role, CA role, ZooKeeper role, AMW service, Kafka service) on the Primary Server

  1. Deploy the ZENworks 2020 Update 2 Appliance serveras a temporary zone with the following settings that are the same as that of the old Primary Server and the database:

    • Hostname, IP

    • ZENworks Ports

    • Management Zone Name

    For more information on deploying an Appliance server, see ZENworks Appliance Deployment and Administration Reference.

    NOTE:

    • Install the new server to a temporary zone and not to the existing production zone. The new server should be installed with same database engine as that in the production zone (if the production zone is using MSSQL, then install the new server with MSSQL in the temporary zone). After the existing Primary Server is replaced with the new server, the new server will start using the actual database in the production zone.

    • If you want to replace more than one Primary Server, you need to install one primary server at a time in the temporary zone and replace its server on a one-to-one basis. Repeat the same for all the other servers in the temporary zone.

    • Ensure that you run the commands as a root user.

  2. Do the following on the new Primary Server:

    1. (Conditional) If you have installed an Appliance server with the Embedded PostgreSQL database, then note down the database credentials for the super administrator and by running the following commands:

      database-get-credentials-superuser (zman dgcs)
      database-get-credentials (zman dgc)
      database-get-credentials-audit (zman dgca)
  3. Restore the backed-up data from the Windows or Linux server. For more information, see Restoring a ZENworks Server in the ZENworks Disaster Recovery Reference.

    1. (Conditional) If the ZooKeeper role does not exist on the source server, then on the current server, which is restored, the services should be stopped by running the following commands:

      • systemctl stop microfocus-zenzookeeper.service

      • systemctl disable microfocus-zenzookeeper.service

      After running the commands, delete the following folder:

      /var/opt/microfocus/zenworks/zookeeper

    2. (Conditional) If the database role does not exist on the source server, then on the current server, which is restored, the database RPM should be uninstalled, and the database services should be stopped by running the following commands:

      • systemctl stop zenpostgresql.service

      • systemctl disable zenpostgresql.service

      Get Postgres RPM name by running following command:

      rpm -qa | grep postgres

      Uninstall that RPM by running the following command:

      rpm -e <name of rpm>

      Example: rpm -e microfocus-zenworks-postgresql-12.4-1.x86_64

    3. (Conditional) If the CA role was not present on the source server, then on the current server, which is restored, remove following two files:

      /etc/opt/microfocus/zenworks/security/caConfig.xml

      /etc/opt/microfocus/zenworks/security/zenca.keystore

  4. Restore the datamodel folder that was copied in the Step 4 of Backing up the existing Windows or Linux Primary Server.

  5. Restore the backed-up tftp files novell-tftp.confand novell-proxydhcp.conf to /etc/opt/novell. Run the following commands on ZENworks Appliance, after restoring the backed-up data:

    rm -f /etc/opt/novell/zenworks/preboot/novell-tftp.conf
    ln -s /etc/opt/novell/novell-tftp.conf /etc/opt/novell/zenworks/preboot/novell-tftp.conf
    rm -f /etc/opt/novell/zenworks/preboot/novell-proxydhcp.conf
    ln -s /etc/opt/novell/novell-proxydhcp.conf /etc/opt/novell/zenworks/preboot/novell-proxydhcp.conf
  6. (Conditional) Restore the backed-up database.

    MS SQL: For detailed information on how to move the data to a new MS SQL database, see the MS SQL documentation. Later on, perform the steps described in Configuring the ZENworks Server to Point to the New MS SQL Database Containing Data Moved from Another MS SQL Database in the ZENworks Database Management Reference.

    Oracle: For detailed information on how to move the data from one Oracle database to another Oracle database, see the Oracle documentation. Later on, perform the steps described in Configuring the ZENworks Server to Point to the New Oracle Database Containing Data Moved from Another Oracle Database in the ZENworks Database Management Reference.

    PostgreSQL: For detailed information on how to move the data from one PostgreSQL database to another PostgreSQL database, see the Oracle documentation. Later on, perform the steps described in Backing up an Embedded PostgreSQL Database on One Primary Server and Restoring it on another Primary Server in the ZENworks Database Management Reference.

  7. If Kafka was configured on the source Primary Server, then enable the Kafka service on this Appliance Server by running the following commands:

    • systemctl enable microfocus-zenkafka.service

    • systemctl enable microfocus-zenkafka-schema-registry.service

    • systemctl enable microfocus-zenkafka-connect.service

  8. Run the following query to add the Appliance Server role:

    microfocus-zenworks-configure -c AddRole -DdestGuid=<GUID> -Drole=ApplianceServer

    where <GUID> is the GUID of the old Primary Server that is being replaced.

    microfocus-zenworks-configure -c AddRole -DdestGuid=cd65a48408ee1e46e5984947fc51b5e3 -Drole=ApplianceServer

    The GUID can be found in the following location:

    On Linux: /etc/opt/microfocus/zenworks/guid.txt

  9. Run the following command on the Appliance server:

    1. microfocus-zenworks-configure -c MergeTruststore -Z

    2. microfocus-zenworks-configure -c UpdateTrustStorePasswordConfigureAction

    3. microfocus-zenworks-configure -c GenerateOSPProperties

    4. microfocus-zenworks-configure -c UnifyTrustStoreForApplianceConfigureAction

    5. microfocus-zenworks-configure -c EnableJMX

    6. microfocus-zenworks-configure -c ZenProbe

    7. microfocus-zenworks-configure -c EnableJMX

    8. microfocus-zenworks-configure -c UpdateJMXOptionsConfigureAction

    9. Execute permissions.sh file which is available at /opt/microfocus/zenworks/bin/

  10. Re-create all the default and custom deployment packages.

    Default Deployment Packages: At the server’s command prompt, enter the following command:

    microfocus-zenworks-configure -c CreateExtractorPacks -Z

    NOTE:The microfocus-zenworks-configure -c CreateExtractorPacks -Z command will not rebuild the Mac pre-agent installer package.

    IMPORTANT:Ensure that you do not run the ZMAN SURP command instead of microfocus-zenworks-configure -Z -c CreateExtractorPacksConfigureAction to rebuild deployment packages. The command microfocus-zenworks-configure -Z -c CreateExtractorPacksConfigureAction uses a different method to rebuild deployment packages. For more information, see Rebuilding the Default Packages in ZENworks Discovery, Deployment, and Retirement Reference.

    Custom Deployment Packages: At the server’s command prompt, enter the following command:

    microfocus-zenworks-configure -c RebuildCustomPacks -Z

    To avoid any errors while running this command, ensure that the custom packages are available in the new server at the following location before you run the command: /opt/microfcus/zenworks/install/downloads/custom.

  11. Copy all the contents of the backed-up content-repo directory to the /var/opt/microfocus/zenworks/directory. If you have any issues in copying content-repo directory in Linux, then run permissions.sh file which is available at /opt/microfocus/zenworks/bin/.

  12. (Optional) Also, copy the backed-up TFTP files to the second Primary Server. The tftp directory is located in the folder /srv/.

  13. (Conditional) If only Antimalware was configured on the old Primary server (that is the server that is being replaced), run the following configure actions:

    microfocus-zenworks-configure -c ZENServicesFirewallConfigureAction -Dservice=antimalware -Doperation=ADD

    microfocus-zenworks-configure -c AntimalwareServiceConfigureAction -Dam.service.action=start

  14. Restart the services by running the microfocus-zenworks-configure -c Start command, and then select the restart option.

    NOTE:If you find Windows paths under /etc/opt/microfocus/zenworks/settings/zenapigatewaysettings.sh, replace the Windows paths with Linux paths.

    For example, all instances of C:\\Program Files (x86)\\Micro Focus\\ZENworks\\conf\\security\\ should be modified to /etc/opt/microfocus/zenworks/security/

  15. Ensure that the new server is functioning properly.

    1. Check the ZCC and Appliance configuration pages are working properly.

    2. Check whether the Appliance Summary details are updated under ZCC > Devices > Servers. If the OS details or the last contact time is not updated, run the zac refresh command on the server to refresh the page with new data.

NOTE:After migrating the Windows server to Appliance, administrator should reassign the bundles and polices that are applicable to Linux Primary Server. Also, administrators should re-look into the static group where the Windows Primary was part of, because now the platform has been changed for the Primary Server.