Dbmove
From DLXS Documentation
Main Page > Working with DLXS Components > Working with DLXS Utilities and Applications > dbmove
Contents |
[edit] Overview
dbmove is used to move a dlxs database from one type of database engine to another. As of DLXS release 13 dbmove is obsolete. In past releases, it supported moving the DLXS database from CSV to MySQL, or from MySQL to CSV. CSV databases are no longer supported. dbmove is still delivered to support the case where a DLXS site currently running a version 5 CSV database. In that case an empty MySQL database should be created via the dbmove command: $DLXSROOT/bin/db/dbmove -s CSV -t MySQL (documented below) to populate it before upgrading it to a MySQL version 6 DLXS database. Please refer to the upgrade documentation for this step.
[edit] Moving a database from CSV to MySQL
If moving from the CSV database to MySQL, make sure that:
- there is a dlxs database in MySQL
- that there is a user dlxsadm for that database that uses the password used by the dbmove script.
- that user dlxsadm has administrative privileges over that database (since that user will need to create tables and index them)
You can then issue the command dbmove -s CSV -t MySQL
If you are using dbmove from version 12 of DLXS, make sure you have version 5 of the dabase before you try to use dbmove to move your CSV database to MySQL. dbmove in DLXS version 12 will not move CSV database version 4 or smaller to MySQL. This is because in version 12 of DLXS dbmove was changed to create a utf8 MySQL database prior to moving the database from CSV to MySQL. This presents a problem when moving CSV databases of version 4 or smaller, since some of the tables contain keys that exceeded the size limit in a utf8 MySQL database, therefore, you will get errors when moving databases version 4 or smaller.
[edit] Moving a database from MySQL to CSV
If moving from a MySQL database to CSV, make sure that there are no files in the $DLXSROOT/misc/db directory, and that the dbmove script has permissions to write to that directory. Since the MySQL database contains tables with potentially enormous amounts of data, like the sessions, and Pageview tables, the dbmove script will not permit you to move the entire MySQL database to CSV. You can use the "-r all" switch to indicate that only collmgr tables with userid dlxsadm, and production should be moved; and that nothing is moved from the PageviewFig, BookBagDB, and sessions tables. Certain sample ids from the Pageview table are moved. The command to issue is then:
dbmove -r all -s MySQL -t CSV
[edit] Creating a release database
NOTE: This type of functionality is really only for DLPS. It is used to create the release CSV directory that becomes part of the DLXS deliverable. It will contain a sample of DLPS collections and groups with userid dlxsadm, and production (see discussion on <a href="collmgr.html">collmgr</a> for an explanation of these users). In order to execute this, you need to enter the following command: dbmove -r [all | release | workshop ] -s MySQL -t CSV
. The -r switch indicates that we only want to place rows in the CSV tables with userid dlxsadm, or production, and the values all, release, and workshop mean the following:
- all means move all the collections into a CSV database with these userids.
- release means move only the collections we want to release to serve as a set of sample collections with these user ids.
- workshop means move only the collections we will be using in the workshop into a CSV database with these user ids.
In addition to these collections, the CSV database created will contain a few sample ids in the Pageview table. The PageviewFig, BookBagDB, and sessions tables will be created, but will contain no data.