This migration procedure describes how to migrate your 5.x, 6.x and 7.x database to Zim 8.x.
If you have a Zim 4.x database, you must first migrate it to Zim 7.11 and then to Zim 8.x. If you don't have a copy of Zim 7.11 to perform the intermediary pass, call Zim Sales Representatives to obtain a temporary Zim 7.11 copy.
Even though the migration process does not affect your database, it is a good practice to backup your original database to a safer place like a tape or another disk directory.
Before exporting your database, make sure that ZOM (ZIM Object Manager) is updated. To do it, run the following commands within a Zim 7.11 session:
> ZOMEnable
> ZOMReset
This step exports the definition of the Data Dictionary to text files and optionally exports existing data. Your data doesn't need to be exported as it is fully compatible with Zim 8, but it is a good idea to export it if you have a small or medium size database.
1. Copy the file "zim8cnv1.cmd" from the directory where your zim8 software was installed to your database where export is going to occur.
2. Before entering your migration database, ensure that you have, at least, the following configuration options in your config.db file:
parameter size 32000
directories <number of directories of your application>
files 100
3. Start a single-user session of Zim 7.11 (or a previous version as discussed above) in the database that you are going to convert to Zim 8 and create a document to match the zim8cnv1.cmd file that you copied to your database, this way:
> aft docs
zim8cnv1 zim8cnv1.cmd
> create doc zim8cnv1
4. Still in this Zim session, from the Zim prompt, run the document. This will export all your definitions and create a README.TXT file in the "port" directory in the database directory;
> zim8cnv1
5. 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 the step G. We recommend you to export your data because all the process will be much easier, but it will take more time to complete the whole process. If your database is very big or if your machine is not very fast, then most probably the best idea is not to export the data.
WARNING
The export mechanism only exports the definitions of the database, but does not copy files like dirs.zim and areas.zim. It is administrator's responsibility to ensure that these files are correct and copy them to the appropriated places.
You need to create a Zim 8 database using ZIMINIT. Here, the examples show only Windows.
• For example, you could create a database called test8 in c:\databases\test8.
• Once this database is created, copy the files from the ZimX.xx\port directory to c:\databases\test8\port.
Create or update the zimdb.zim file and proceed as documented in ZIMSERVER executable in order to start Zim Server.
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 ZIM executable. However, enter the parameter
-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
-c ""
In this case, Zim will show you the prompt. You can then type:
> zim8cnv2
Proceed as documented in ZIMSERVER executable in order to stop Zim Server.
If, in the 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, 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.