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

NOTE:

  • If you want to replace more than one server, you need to install the same number of servers and replace each server on a one-to-one basis, sequentially. For faster deployment, all servers can be deployed to a single temporary zone.

  • The migration steps should not be performed if you have configured multi-node ZooKeeper cluster.

  1. Deploy the ZENworks 23.4 Appliance server with the following settings that are the same as that of the old Primary Server:

    • 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 can be installed with any database engine (preferably the same database engine as that in the production zone, that is, 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 the same number of servers and replace each server on a one to one basis, either simultaneously or sequentially. For faster deployment, all servers can be deployed to a single 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.

  4. Restore the backed up preboot configuration files to the following location:

    • Windows: %ZENWORKS_HOME%\conf\preboot

    • Linux: /etc/opt/microfocus/zenworks/preboot

    If you are migrating from Windows, make sure to rename all of the filenames from novell to microfocus. For example, novell-proxydhcp.conf should be renamed to microfocus-proxydhcp.conf

  5. (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.

  6. 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

  7. Run the following configure action 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. Execute permissions.sh file which is available at /opt/microfocus/zenworks/bin/

  8. 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.

  9. 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/.

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

  11. 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/zen-api-gateway/application.properties, 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/

  12. 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.