Migration from 3.0 to 4.0
From OpenKM Documentation
Download the migration utility called OKMUtils-4.0.jar. This is a self-contained JAR with all the required dependencies. Can be executed from command line as:
$ java -Xmx512m -jar OKMUtils-4.0.jar
And will show the parameters needed:
- RepositoryOldConfig: Path to the old repository configuration file. This is the $OLD_JBOSS_HOME/repository.xml file by default. Perhaps is different if you changes the repository.config property in OpenKM.cfg file.
- RepositoryOldHome: Path to the old repository directory. This is the $OLD_JBOSS_HOME/repository directory by default. Perhaps is different if you changes the repository.home property in OpenKM.cfg file.
- RepositoryNewConfig: Path to the new repository configuration. If you downloaded the JBoss + OpenKM bundle, there is a default $NEW_JBOSS_HOME/repository.xml file.
- RepositoryNewHome: Path to the new repository directory. This is the $NEW_JBOSS_HOME/repository directory by default. This folder actually does not exists and will be created in the migration process.
These are the required steps to make a migration.
- Download the new OpenKM version and uncompress it.
- Stop the actual JBoss instance and make a backup.
- Modify the $NEW_JBOSS_HOME/server/default/conf/login-config.xml according to the old settings. If you didn't change it in the actual installation, this step is not required.
- Modify the $NEW_JBOSS_HOME/server/default/deploy/openkm-ds.xml according to the old settings. If you didn't change it in the actual installation, this step is not required.
- You need some changes in you database tables:
- Change role UserRol to UserRole (tables roles and user_role)
- Change role AdminRol to AdminRole (tables roles and user_role)
- Table users has a new field usr_name VARCHAR(64)
ALTER TABLE users ADD COLUMN usr_name varchar(64) NULL;
- Remember that in this OpenKM release, the defaul setting are for MD5 password encoded, so you have to make this changes.
- Add this new table:
CREATE TABLE mail_accounts(ma_id IDENTITY, ma_user VARCHAR(32), ma_mhost VARCHAR(32), ma_muser VARCHAR(32), ma_mpass VARCHAR(32), ma_mfolder VARCHAR(32), ma_active BOOLEAN, PRIMARY KEY(ma_id)); CREATE TABLE twitter_accounts(ta_id IDENTITY, ta_user VARCHAR(32), ta_tuser VARCHAR(32), ta_active BOOLEAN, PRIMARY KEY(ta_id));
- Modify the $NEW_JBOSS_HOME/server/default/deploy/mail-service.xml according to the old settings.
- Modify the $NEW_JBOSS_HOME/OpenKM.cfg according to the old settings. Remember to check the changelog because some properties can be deprecated.
- Perhaps you need to copy the JDBC library from $OLD_JBOSS_HOME/server/default/lib to $NEW_JBOSS_HOME/server/default/lib. You can skip this step for a default OpenKM installation.
- Run the migration utility.
- Start the new JBoss.