< All Topics

Migrating to ZIM:X

The migration of Zim 9.x database to ZIM:X requires the steps below. For the purpose of this document, the expression “Old Database” means your existing Zim 9.x database whereas “New Database” means the migrated ZIM:X database.

A) Name Clarification

The following module and tool names are used in this migration:

. ZXSERVER and ZXCLIENT: Modules provided by the Zim:X product to run Zim:X databases;
. ZOMENABLE, ZOMDATASAVE, ZOMDATALOAD, ZOMEXPORT and ZOMIMPORT: Tools belonging to the ZOM package used to facilitate the migration;
. ZimServer and ZimQTC: Modules provided by previous versions of Zim.

B) Backup your Old Database

The migration process is destructive thus requiring you to backup your old database. For safety reasons, you can make more than one backup. Before the backup, make sure that no users are accessing the database and that ZimServer is no longer running. You must have killed ZimServer with the option “-k” to guarantee data integrity.

C) Export Data and Database Definitions From the Old Database

Using existing Zim tools, this step will export all database definitions and all data from the old database.

  1. Start ZimServer;
  2. Start a ZimQTC session to get the Zim prompt;
  3. From the prompt, run “ZOMENABLE” to access the ZOM tools;
  4. From the prompt, run “ZOMEXPORT *” to export all database definitions;
  5. From the prompt, run “ZOMDATASAVE *” to export all existing data;
  6. Kill ZimServer using the option “-k”.

The process above produces new files that could be backed up as well. If desired, this step can be executed before the backup.

D) Clean the Old Database

Certain files need to be deleted (removed) from the old database to make room for the new one:

  1. Remove all files with the name “ZIMxxxx” where “xxxx” ranges from “0000” to “9999”;
  2. Remove the operating system directories identified by “ZIMxxxx.WS”;
  3. Remove the operating system directories identified by “yyyyy” where “yyyyy” ranges from “00001” to “99999”;
  4. Remove the operating system directories named “DCRT” and “DPSRT”.

E) Install ZIM:X

Using the ZIM:X Full Installer, perform its installation on your computer following the installer guidelines.

F) Initialize the New Database

Still located in the old Zim database directory, initialize (create) the new database. From this point on, this database is going to be referred to as the “New Database”.

ZXCREATOR <full new database path> ZIMXDATABASE

G) Import the New Database Definitions

This step will import all database definitions to the new database. Should errors arise during the import, carefully inspect these errors and decide:

  1. The errors need to be corrected immediately: In this case, you will have to restore the database backup, correct the errors and then repeat steps A, B, C and E;
  2. If the errors are minor or could be ignored for the moment, proceed to the next step.

To import the database definitions:

  1. Start ZXSERVER;
  2. Start ZXCLIENT on the new database;
  3. Run “ZOMENABLE”;
  4. Run “ZOMIMPORT” to import all database definitions;
  5. Check for errors.

H) Import all Database Data

Run the following steps after importing the database definitions:

  1. Copy (save) the operating system directory “ZOMSAVING” to “ZOMSAVING.SAVE”. This copy is important; otherwise, the database data will be not be imported;
  2. Run “ZOMDATASAVE *” to create the structure to load the data. It will process zero records;
  3. Remove the operating system directory “ZOMSAVING”;
  4. Copy back the saved directory “ZOMSAVING.SAVE” to “ZOMSAVING”;
  5. Run “ZOMDATALOAD *” to import the database data.

I) Final Checks

The migration process to ZIM:X is now completed. You may still perform the following tasks:

  1. Kill (stop) ZXSERVER;
  2. Make a backup of your new database;
  3. Start ZXSERVER again along with ZXCLIENT;
  4. Compile your ZIM programs if applicable;
  5. Check your data and your database definitions;
  6. Run your application.

Leave a comment