Database Migration

Database moving

For initial installations, if you chose MySQL for your database, use $DLXSROOT/bin/db/dbmove to move the sample CSV database into your MySQL database before you try to run the sample data. This assumes you have configured a MySQL database as described in the MySQL database configuration documentation.

Database conversion

If you are installing DLXS for the first time, database conversion is not an issue.

If you have a Release 10 DLXS installation, an upgrade utility called upgrade_3_4 in $DLXSROOT/bin/db can be used to update your version 3 database to version 4. See documentation on database functionality for complete instructions.

If you have a Release 9 DLXS installation, an upgrade utility called upgrade_2_3 in $DLXSROOT/bin/db can be used to update your version 2 database to version 3. See documentation on database functionality for complete instructions.

If you have a Release 8 DLXS installation, an upgrade utility called upgrade_1_2 in $DLXSROOT/bin/db can be used to update your version 1 database to version 2. See documentation on database functionality for complete instructions.

If you have a DLXS installation that predates release 8, a conversion utility called dbconv in $DLXSROOT/bin/db can be used to capture the data in your existing colldb files and merged into the CSV tables located in DlXSROOT/misc/db. See documentation on database functionality for complete instructions.

Having two database installed to support two DLXS versions

Be aware of the following:
    Version 8 of DLXS uses version 1 of the database.
    Version 9 of DLXS uses version 2 of the database
    Version 10 of DLXS uses version 3 of the database.
    Version 11 of DLXS uses version 4 of the database.

Therefore, if you have version 8, 9, or 10 of DLXS and have installed version 11 of DLXS, you will need to get a database version 4 set up to use with your DLXS version 11 installation.

How should you go about doing this? Here are a few strategies to help you decide what to do:

1. Say you have version 8 of DLXS using version 1 of a CSV database, and you want to create a version 4 CSV database to run with a DLXS 11 installation.


If you do not have too many collections, you may just want to go though collmgr and change the database that way.

If this is not feasible, copy your CSV tables from version 8 ($DLXSROOT/misc/db, where $DLXSROOT is the environment variable you used for version 8) to the CSV dir for version 11 ($DLXSROOT/misc/db, $DLXSROOT is the one you used for version 11). Then run the upgrade scripts on the just copied files. To go from DLXS 8 to DLXS 11 you will need to run upgrade_1_2 -d CSV, then upgrade_2_3 -d CSV, and finally upgrade_3_4 -d CSV. See complete instructions on the upgrade scripts.

2. Say you have version 8 of DLXS using version 1 of a CSV database, and you want to create a version 4 of a MySQL database to run with a DLXS 11 installation.


In this case you could follow the instructions presented in 1, and then run

$DLXSROOT/bin/db/dbmove -s CSV -t MySQL

This will move your CSV database into a MySQL database.  Of course, a MySQL database needs to exists with the appropriate permissions. See MySQL database configuration documentation for more details.

You could also move the database 1st and then run the upgrade scripts.

3.  Say you have version 8 of DLXS using version 1 of a MySQL database, and you want to create a version 4 of a MySQL database to run with a DLXS 11 installation.


In this case, the easiest thing would be to start up MySQL with the root password and copy your database version 1 to the name you gave it when you installed DLXS 11. Then run the upgrade scripts on the copy of the database. Unfortunately, you cannot copy a database with MySQL. This is a feature MySQL is thinking of adding, but it is not available yet. To view a list of features to be added to MySQL, check the MySQL web site.

What we would suggest is that you dump your version 1 of the MySQL database into a dir and then load that data into a newly created database.  Note that you may want to delete some entries in the sessions table before dumping the database into the directory since this table tends to get very large.  After this is done you can run the upgrade scripts on the newly created database.  

Here are the steps to dump one database, create a new database, and popultate it with the data dumped from the first:

  1. From Unix prompt, make sure you have given DUMPDIR write permissions (you can also do this to backup the db):
    shell>mysqldump -u root -p --tab=DUMPDIR dlxs
  2. Go into mysql as root and create the database
    mysql> create database dlxs11;
  3. Create the tables in the new database
    shell> cat DUMPDIR/*.sql | mysql -u root -p dlxs11
  4. Now load the data in the database.
    shell> mysqlimport -u root -p dlxs11 DUMPDIR/*.txt