4.3 Restoring the Embedded Sybase SQL Anywhere Database on the ZENworks Appliance Server

  1. Ensure that you have archived your database credentials.

    To archive the credentials of an internal Sybase database, perform the following tasks on PSDB1:

    1. Ensure that the database services are running.

      On Windows: In the Windows Services, ensure that the status of Novell ZENworks Embedded Datastore and Novell ZENworks Embedded Datastore For Auditing are Started.

      On Linux: At the console prompt, enter /etc/init.d/sybase-asa status to verify the status of the Sybase database and /etc/init.d/sybase-audit-asa status to verify the status of the Audit database. If the databases are not running, start the Sybase database by running the /etc/init.d/sybase-asa start command and the Audit database by running the /etc/init.d/sybase-audit-asa start command.

    2. Execute the zman dgc command to get the Sybase database credentials.

    3. Execute the zman dgca command to get the Audit database credentials.

    4. Specify the credentials of the ZENworks administrator when prompted.

    5. Copy and save the username and the password of the Sybase database and the Audit database into a text file.

  2. Stop the Novell ZENworks services, including the ZENworks Embedded Datastore service and the Novell ZENworks Embedded Datastore For Auditing service on PSDB1:

    1. On Windows:

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Specify the number next to the Stop action, then press Enter.

    2. On Linux:

      1. Execute the following command at the server prompt:

        /opt/novell/zenworks/bin/novell-zenworks-configure -c Start

      2. Specify the number next to the Stop action, then press Enter.

  3. Stop the Novell ZENworks services on PSDB2:

    1. Execute the following command at the server prompt:

      /opt/novell/zenworks/bin/novell-zenworks-configure -c Start

    2. Specify the number next to the Stop action, then press Enter.

  4. Get the following files on PSDB2:

    • sybase-asa-12.0.1-3873.x86_64.rpm

    • novell-zenworks-sybase-libs-12.0.1-3873.x86_64.rpm

    1. Create a temporary directory named sybase in /tmp/ folder.

    2. Copy the following files from PSDB1 to the temporary location that you created on PSDB2 (Step 4.a).

      • For Windows:

        • sybase-asa-12.0.1.3924.x86_64.msi

        • novell-zenworks-sybase-libs-12.0.1.3924.x86_64.msi

        If PSDB1 is a Windows server:

        • The MSIs are located in the following directory:%ZENWORKS_HOME%\install\downloads\msi

        • The RPMs are located in the following directory:%ZENWORKS_HOME%\install\downloads\rpm

      • For Linux:

        • sybase-asa-12.0.1-3873.x86_64.rpm

        • novell-zenworks-sybase-libs-12.0.1-3873.x86_64.rpm

        If PSDB1 is a Linux server:

        • The MSIs are located in the following directory:

          \opt\novell\zenworks\install\downloads\msi\

        • The RPMs are located in the following directory:

          \opt\novell\zenworks\install\downloads\rpm

      Or

      Download the required Sybase SQL Anywhere Embedded EBF package to the temporary location that you created on PSDB2 (Step 4.a).

      • For Windows: Launch the shipped ISO file and extract the contents in the media drive. Download the Sybase SQL Anywhere Embedded EBF 3924 package from the MSI folder as shown below:

        D:\Zenworks11SP4\Common\msi\sybase-asa-12.0.1.3924.x86_64.msi

      • For Appliance: Mount the shipped ISO file to any location (for example: /tmp) using the following command:

        mount Zenworks11SP4 -o loop/tmp/ZCM

        From the media root (for example: /tmp/ZCM), download the Sybase SQL Anywhere Embedded EBF 3873 package from the rpm folder as shown below:

        /tmp/ZCM/Common/rpm/sybase-asa-12.0.1-3873.x86_64.rpm

  5. On PSDB2, install sybase-asa-12.0.1.3924.x86_64.msi or sybase-asa-12.0.1-3873.x86_64.rpm.

    On an Appliance server: At the server prompt, execute the following command:

    rpm -Uvh <complete_path_of_directory_that_contains_Sybase_ASA_MSI>/sybase-asa-12.0.1-3873.x86_64.rpm

    For example:

    rpm -Uvh /tmp/sybase/sybase-asa-12.0.1-3873.x86_64.rpm

    The Sybase database is now installed on PSDB2.

  6. On PSDB2, ensure that the installed EBF version is 12.0.1.3924 by running the dblocate utility.

    The dblocate utility is located in the %ZENWORKS_HOME%\share\ASA\BIN64 directory on a Windows database server and in the /opt/novell/zenworks/share/sybase/bin32s directory on a Linux database server.

  7. On PSDB2, install novell-zenworks-sybase-libs-12.0.1.3924.x86_64.msi or novell-zenworks-sybase-libs-12.0.1-3873.x86_64.rpm.

    On an Appliance server: At the server prompt, execute the following command:

    rpm -Uvh <complete_path_of_directory_that_contains_Sybase-libs_MSI>/novell-zenworks-sybase-libs-12.0.1-3873.x86_64.rpm --force

    For example:

    rpm -Uvh /tmp/sybase/novell-zenworks-sybase-libs-12.0.1-3873.x86_64.rpm --force

  8. Change the password of the zenworks user account by using the following command:

    passwd zenworks

  9. Copy the database files from PSDB1 to PSDB2:

    1. Create a directory with the name database in /var/opt/novell/zenworks/ on an Appliance PSDB2.

    2. Copy all the files from %ZENWORKS_HOME%\database\ on Windows PSDB1 to %ZENWORKS_HOME%\database\ on Appliance PSDB2, and from /var/opt/novell/zenworks/database/ on Linux PSDB1 to /var/opt/novell/zenworks/database/ on Appliance PSDB2.

  10. Copy the zenworks_database.conf file and the zenworks_audit_database.conf file from PSDB1 to PSDB2. The zenworks_database.conf file and the zenworks_audit_database.conf file are located in the %ZENWORKS_HOME%\conf\ directory on a Windows Primary Server, and in the /etc/opt/novell/zenworks/ directory on a Linux Primary Server.

  11. On PSDB2, ensure that zenworks_database.conf and zenworks_audit_database.conf contain the correct database path.

    For example, /var/opt/novell/zenworks/database/zenworks_zone_name.db is the database path on a Linux device.

  12. On all the Primary Servers in the Management Zone, update zdm.xml with the correct address of PSDB2 (the new database server). The zdm.xml file is located in ZENworks_installation_path\conf\datamodel on a Windows Primary Server, and in /etc/opt/novell/zenworks/datamodel on a Linux Primary Server.

  13. On the PSDB2 linux server, run the permission.sh command in the /opt/novell/zenworks/bin directory.

  14. Reboot the PSDB2 server.

  15. Start all the ZENworks Services except Novell ZENworks Embedded Datastore and Novell ZENworks Embedded Datastore For Auditing on PSDB1:

    1. On Windows: Perform the following steps:

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Specify the number next to the Start action, then press Enter.

    2. On Linux: Perform the following steps:

      1. Execute the following command at the server prompt:

        /opt/novell/zenworks/bin/novell-zenworks-configure -c Start

      2. Specify the number next to the Start action, then press Enter.

  16. Assign the database role to PSDB2 by running the following command in the DBISQL utility:

    update zZenServerRoles set id=<0xNew DB servers GUID>, position=(select max(position) from zZENServerRoles where id=<0xNew DB servers GUID>)+1 where Roles='Database'