1.2 Restoring a ZENworks Server

This procedure assumes the following:

  • You have a backup of the ZENworks server’s configuration information. See Backing Up and Restoring the ZENworks Server and Certificate Authority.

  • If the ZENworks database resides on the ZENworks server, you have a backup of the database see ZENworks Database Management Reference.

  • The bundles and policies should be replicated to and stored on the ZENworks server. If not, distribution of a policy or bundle from the restored ZENworks server fails. This can be achieved by restoring the content-repo folder that was backed up earlier for the specific Primary Server.

  • Stop the ZENworks server services.

  • After restarting the ZENworks server services, copy the backed up content files to the content repository of the server that is to be restored. The default locations of the content repository are:

    • On a Windows Server: %ZENSERVER_HOME%\work\content-repo

    • On a Linux Server: /var/opt/microfocus/zenworks/content-repo/

    For more information on content repository, see “Content Repository” in ZENworks Primary Server and Satellite Reference.

  • The image files that are stored on the ZENworks Server are available on another ZENworks Server. If not, distribution of the image files from the restored ZENworks Server will fail.

IMPORTANT:

  • When you restore the ZENworks Server and the database, you must first restore the ZENworks Server, then continue with restoring the latest backed-up ZENworks database.

  • If you are restoring the ZENworks Server on an appliance, then ensure that you run the commands as a root user.

To restore a ZENworks server:

  1. Reinstall the ZENworks server, using the same IP address and DNS name.

    If you do not use the same IP address and DNS name, devices that connect to the server need to reregister.

    If you have only one Primary Server connected to an external database in a zone, reinstall the Primary Server and create a dummy database during the installation. You do not need to create an internal database.

    If you have more than one Primary Server connected to an external database in a zone, reinstall the failed Primary Server as a second Primary Server. You are not prompted to configure the database during the installation.

  2. Ensure that you have read/write rights to the %ZENSERVER_HOME%\conf directory on a Windows server or the /etc/opt/microfocus/zenworks directory on a Linux server.

  3. At a command prompt on the ZENworks Server, enter the following command:

    On Linux: zen-backup-restore.sh [mode=backup|restore file=<filename> migration=true|false(optional)]

    On Windows: zen-backup-restore.bat [mode=backup|restore file=<filename> migration=true|false(optional)]

    NOTE:

    • Ensure that you specify the full path of the file in the command.

    For example:

    On Linux: zen-backup-restore.sh mode=restore file="/tmp/backup.zip"

    or

    On Windows: zen-backup-restore.bat mode=restore file="C:\Program Files (x86)\Micro Focus\ZENworks\backup.zip"

    If you are replacing an existing Windows or Linux server with an Appliance server, then run the following command:

    On Appliance: zen-backup-restore.sh mode=restore file="/tmp/backup" migration=true

  4. When prompted, enter a ZENworks administrator name and password for the temporary zone.

  5. When prompted, enter the pass phrase (at least 10 characters) to be used for decrypting the backup.This is the same passphrase that was entered to encrypt the file when backing up the server.

  6. (Conditional) If the database is located on the server, restore the database after the ZENworks Server information has been restored. For instructions see the ZENworks Database Management Reference.

  7. Run the permissions.sh command on the Linux Primary Server to set the correct permissions, which is available at /opt/microfocus/zenworks/bin/.

  8. (Conditional) If you have backups of the image files, restore the files to the %ZENSERVER_HOME%\work\content-repo directory on a Windows server or the /var/opt/microfocus/zenworks/content-repo/images directory on a Linux server.

  9. Restart the ZENworks Server.

NOTE:If the backup and restore process fails, check the following logs to debug the issue:

  • /var/opt/microfocus/log/zenworks/zen-capture-restore_<time_stamp>.log

  • %ZENSERVER_HOME%\logs\zen-capture-restore_<time_stamp>.log