Migrating ZENworks 6.6.x Data

After you've created a ZENworks 7 system, you can migrate ZENworks 6.6.x data from a ZENworks 6.6.x Server to your ZENworks 7 Data Store. Only a subset of the ZENworks 6.6.x data is migrated.

Data that is migrated: Data that is not migrated:
  • Administrator accounts
  • Channels (to catalogs)
  • Packages and package sets (to bundles)
  • Package history and dependency information
  • Activations
  • Transactions
  • Logs
  • Organizations
  • Device inventory

The password for a migrated account is reset to the account username. For example, a ZENworks 6.6.x account with username richard and password fortuna is reset in ZENworks 7 to username richard and password richard.

The platforms supported as managed devices have changed from ZENworks 6.6.x to ZENworks 7. The data migration process does not migrate packages that have an unsupported platform as their target installation platform.

To migrate the data from a ZENworks 6.6.x database:

  1. Dump the ZENworks 6.6 database information to a plain-text file.

    The migration process requires that the ZENworks 6.6.x database and ZENworks 7 database be located on the same server. Dumping the ZENworks 6.6.x database information to a file enables you to then re-create the ZENworks 6.6.x database on the ZENworks 7 Server. To dump the data:

    1. Log in to the ZENworks 6.6.x Server as root.

    2. Run the following command:

      pg_dump -R -c -f rcserver.dump rcserver -U rcadmin

      • pg_dump: The command to extract a PostgreSQL database into a file.
      • -R: Stops pg_dump from outputting a script that requires reconnections to the database when it is restored.
      • -c: Issues commands to clean database objects prior to issuing the commands for creating them.
      • -f rcserver.dump: Specifies the filename of the text file to be created.
      • rcserver: Specifies the name of the ZENworks 6.6.x database.
      • -U rcadmin: Specifies the name of the ZENworks 6.6.x administrator account.
  2. Copy the file from the ZENworks 6.6.x Server to the ZENworks 7 Server.

  3. Log in as root on the ZENworks 7 Server and open a shell session.

  4. Use the following command to display the password for your ZENworks 7 database:

    cat /etc/opt/novell/zenworks/serversecret

    You get a password similar to this: e3db269e090c4401ad43c7a31fw61f6e. You need to enter this password twice during the migration process. Either record it on a piece of paper or copy it to the clipboard.

  5. Create a new ZENworks 6.6.x database on the ZENworks 7 Server. To do so:

    1. Enter the following command to log in to PostgreSQL as the super user:

      su postgres

    2. Enter the following command to create the database:

      createdb -U zenadmin zlm661

    3. When prompted for a password, enter the password you recorded in Step 4.

    4. After the database is created, press CTRL+D to exit the database.

  6. Configure PostgreSQL to know about the new ZENworks 6.6.x database. To do so:

    1. Open the /var/lib/pgsql/data/pg_hba.conf file in a text editor.

      The file will look similar to the following:

      --- begin file ---### zlm datamodel configured ###local   all        postgres                    ident   sameuser 

      local   zenworks   zenadmin                    md5
      host    zenworks   zenadmin    0.0.0.0 0.0.0.0 md5

      local   template1  all                         md5
      host    template1  all         0.0.0.0 0.0.0.0 md5

      -- end file ---
    2. Define the ZENworks 6.6.x database in the configuration file by adding the italicized lines shown below.

      --- begin file ---### zlm datamodel configured ###local   all        postgres                    ident   sameuser 

      local   zenworks   zenadmin                    md5
      host    zenworks   zenadmin    0.0.0.0 0.0.0.0 md5

      local   zlm661     zenadmin                    md5
      host zlm661 zenadmin 0.0.0.0 0.0.0.0 md5

      local   template1  all                         md5
      host    template1  all         0.0.0.0 0.0.0.0 md5

      -- end file ---
    3. Save the modified file, then restart the PostgreSQL database by using the following command:

      /etc/init.d/postgresql restart

      Wait several minutes to make sure the PostgreSQL database is completely up and running.

  7. Dump the ZENworks 6.6.x data from the rcserver.dump file into the new ZENworks 6.6.x database. To do so:

    1. Enter the following command:

      psql - Uzenadmin zlm661 <rcserver.dump

    2. When prompted for a password, enter the password you recorded in Step 4.

      The information from the rcserver.dump file is added to the ZENworks 6.6.x database. During the process, you might see some warning messages; ignore these messages.

  8. Migrate the data from the ZENworks 6.6.x database to the ZENworks 7 database. To do so:

    1. Make sure that zlm-upgrade is in your path. You can use the following command to check:

      which zlm-upgrade

      If the utility is in your path, you see the following displayed:

      /opt/novell/zenworks/bin/zlm-upgrade

      If not, add it to your path using the following command:

      export PATH=$PATH:/opt/novell/zenworks/bin

    2. Migrate the data using the following command:

      zlm-upgrade zlm661 zenadmin package_repository password

      Replace package_repository with the path to the package repository on the ZENworks 6.6.x Server. Replace password with the password you recorded in Step 4.

      After the migration starts, it might take quite a while depending on the number of channels and packages being migrated. Do not interrupt the process. You receive a "Done" message when the migration is complete.

      You should be aware of the following regarding the migrated data:

      • The password for a migrated account is reset to the account username. For example, a ZENworks 6.6.x account with username richard and password fortuna is reset in ZENworks 7 to username richard and password richard.
      • The platforms supported as managed devices have changed from ZENworks 6.6.x to ZENworks 7. The data migration process does not migrate packages that have an unsupported platform as their target installation platform.
  9. After the migration is complete, restart the ZENworks 7 services by using the following command:

    /opt/novell/zenworks/bin/zlm-config --restart

  10. (Optional) If desired, you can remove the ZENworks 6.6.x database. To do so:

    1. Enter the following command to log in to postgres as the super user:

      su postgres
    2. Enter the following command to remove the database:

      dropdb -U zenadmin zlm661

    3. When prompted for a password, enter the password you recorded in Step 4.

    4. After the database is removed, press CTRL+D to exit.

    5. Edit the pg_hba.conf file to remove the lines added in Step 6.b, then save the modified file.

    6. Restart postgres:

      /etc/init.d/postgresql restart