Respository export/import fails
PostPosted:Wed Nov 02, 2011 1:57 pm
Ok, as requested I start a new topic for this problem.
I tried to export and than import the repository to change the versioning configuration from derby to mysql.
Ok, here is what I did.
I wrote my own migration guide:
The repository is imported, but for each originally file there a two files now.
FILENAME.EXT
FILENAME.EXT.JSON
Both are although in the REP_EXP_HOME, but this seems correct, because of the stored metadata. But the JSON-files should not be imported. Instead of importing them, the metadata should be read and set in the database.
Ok, some more information you could need:
OKM Version for export and import
-> Version: 5.1.8-SNAPSHOT (build: 7350)
Errors on importing:
-> Only a lot of warning that no text extraction could be done on the json files
Sample JSON file for an image (1.jpg):
Hopefully you may help.
Thanks and best regards.
I tried to export and than import the repository to change the versioning configuration from derby to mysql.
Ok, here is what I did.
I wrote my own migration guide:
For the reconfiguration of the versioning storage I removed this:
- Shutdown OpenKM
- Backup complete MySQL
- Specific Backup of tables: OKM_CRON_TAB, OKM_CONFIG
- Backup whole repository folder (OKM_ROOT/repository)
- Download and install OpenKM Integration WAR
- Startup OpenKM
- Go to ADMIN->Repository export->check Metadata and export the repository (REP_EXP_HOME)
- Shutdown OpenKM
- edit the OKM_ROOT/repository.xml and reconfigure for MySQL versioning (see below)
- clear database
DROP DATABASE okm_app;
CREATE DATABAE okm_app;
DROP DATABASE okm_repo;
CREATE DATABAE okm_repo;- edit OKM_ROOT/openkm.cfg and set hibernate.ddl to create
- clear the the OKM_ROOT/repository folder
rm -r repository
mkdir repository- Startup OpenKM (to create database tables)
- Shutdown OpenKM
- edit OKM_ROOT/openkm.cfg and set hibernate.ddl to none
- Import the database tables: OKM_CRON_TAB, OKM_CONFIG
- Startup OpenKM
- Go to ADMIN->Repository Import, check Metadata and import the repository from REP_EXP_HOME
Code: Select all
And inserted this:
<Versioning rootPath="${rep.home}/version">
...
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
</Versioning>
Code: Select all
After that I got the following problem.<Versioning rootPath="${rep.home}/version">
...
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/okm_repo?autoReconnect=true"/>
<param name="schema" value="mysql"/>
<param name="user" value="openkm"/>
<param name="password" value="******"/>
<param name="schemaObjectPrefix" value="version_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager-->
</Versioning>
The repository is imported, but for each originally file there a two files now.
FILENAME.EXT
FILENAME.EXT.JSON
Both are although in the REP_EXP_HOME, but this seems correct, because of the stored metadata. But the JSON-files should not be imported. Instead of importing them, the metadata should be read and set in the database.
Ok, some more information you could need:
OKM Version for export and import
-> Version: 5.1.8-SNAPSHOT (build: 7350)
Errors on importing:
-> Only a lot of warning that no text extraction could be done on the json files
Sample JSON file for an image (1.jpg):
Code: Select all
The imagefile (1.jpg) itself is correct in the REP_EXP_HOME folder.{"path":"/okm:root/Testfolder/1.jpg","language":"","author":"rf2","created":{"year":2011,"month":9,"dayOfMonth":14,"hourOfDay":15,"minute":58,"second":51},"lastModified":{"year":2011,"month":9,"dayOfMonth":14,"hourOfDay":15,"minute":58,"second":51},"mimeType":"image/jpeg","locked":false,"checkedOut":false,"actualVersion":{"name":"1.0","created":{"year":2011,"month":9,"dayOfMonth":14,"hourOfDay":15,"minute":58,"second":51},"size":11418,"author":"rf2","actual":true,"comment":""},"permissions":15,"uuid":"7663ce8b-0ce4-4482-8cdc-2ec555cf2579","subscribed":false,"convertibleToPdf":true,"convertibleToSwf":true,"convertibleToDxf":false,"subscriptors":[],"keywords":[],"categories":[],"notes":[]}
Hopefully you may help.
Thanks and best regards.