Migrating Guide from Zim 7.x to Zim 8

This guide describes the process of migrating a database from Zim 7.x to Zim 8.

a) Backup Your Original Database

Even though the migration process does not affect your database, it is a good practice to backup your original database to a safer place.

b) Export Your Database

This step exports the definitions of the Data Dictionary to text files and optionally exports existing data.

If the converted Zim 8 will be hosted on the same operating system as the original Zim 7.x database, there is no need to export your data, since it will remain the same format.

However, if the converted database will be hosted in a different operating system, you must also export your data.

1. Copy the file zim8cnv1.cmd from the directory where Zim 8 was installed to the directory of your original database

2. Before starting the database migration, create or update the  config.db file (found in the original database directory) and ensure that you have the following configuration options

parameter size 32000
directories <number of Zim directories of your application>
files 100

3. Start a single-user Zim 7.x session in the database you are going to convert to Zim 8 and create a document to match the zim8cnv1.cmd file that you copied to your database:

> aft docs
zim8cnv1 zim8cnv1.cmd
> create doc zim8cnv1

4. Run the program from the Zim 7.x prompt. This will export all your definitions to the \port directory in the database directory

> zim8cnv1

 

You will have the option of exporting the Data Dictionary and/or the data from your database. If you choose to also to export the data, then you don't have to execute step H. We recommend you to export your data because the entire process will be much easier, but it will require more time to complete.

 

WARNING

The export mechanism only exports the definitions of the database, but does not copy files like dirs.zim and areas.zim. It is the administrator's responsibility to ensure that these files are correct and to copy them to the appropriated places.

 

5. Exit your Zim 7.x session

c) Create Your Zim 8 Database

1.Create a Zim 8 database using ZIMINIT ( Unix ) or ZIMINITW ( Windows ).

For instance, on Windows, create  Ex8 in C:\Databases\Ex8.

 

3. Copy the files from the original \port directory to C:\Databases\Ex8\port.

4. Create or update the zimdb.zim file located in the Zim 8 installation directory.

d) Start Zim Server

Proceed as documented in ZIMSERVER executable in order to start Zim Server.

zimserver

e) Run the Database Converter Zim Thin Client or ZimQt

This step cannot be executed without creating a fresh Zim database (as described in step D) and should never be executed twice over the same database.

To run Zim to import your database, proceed as documented in the ZIM executable. However, enter the parameter

zimtc .... -c zim8cnv2

as the <command> so that it immediately begins the process of importing your database into Zim 8. Or, if you prefer, you can specify

zimtc .... -c ""

In this case, Zim will show you the prompt. You can then type:

> zim8cnv2

f) Stop Zim Server

Proceed as documented in ZIMSERVER executable in order to stop Zim Server.

zimserver -k

g) Copy Your Data Files

If, in step B, you chose not to export the data from your Zim files, then you have to copy the physical files to your new database.

To do this, just copy your Zim files named from zim0100 and up to your new Zim 8 database.

 

WARNING

If you have Zim directories in your database, you CANNOT copy the files corresponding to these Zim directories because the internal structure is different from Zim 8 to previous versions of Zim. If you are not sure which files you should not copy, just look at operating system directories named like zimxxxx.ws. These files, zimxxxx.ws, should not be copied to the new Zim 8 database.

At this point, your Zim files are still in previous versions of Zim. However, as soon as you start Zim Server again and start using your application, all files will be automatically and silently converted to Zim 8. If you want to guarantee a full migration, start Zim Server and manually issue a FIND 1 over all Zim files.

h) Update Configuration Files

The database converter reports two values that may need to be changed in configuration files: maximum tables and directories.

1. Change the value of maximum tables in zimconfig.srv if the reported value is larger than the default ( 400 ) or the current value in the file.

The zimconfig.srv configuration file is located in the Zim 8 installation directory.

2. Change the value of directories in zimconfig.zim if the reported value is larger than the default ( 10 ) or the current value in the file.

The zimconfig.zim configuration file is located in the converted database directory. If this file does not exist, you need to create it.

 

For more information on configuration options, visit Types of Configuration Files.

 

i) Manually import special files into your new Zim 8 database

You must manually copy programs, other documents, and images from your original database to the converted database.