This is HOWTO for migrating database content from Portal 2.0 to Portal 2.2
There is a simple tool for migration which is currently under developement.
It is not finished yet but functional already.
Currently migration tool can migrate:
users
roles
users/roles relations
users preferences
descriptors (not including security configuration)
To use it you should:
Download latest portal 2.2 sources:
cvs co -r JBoss_Portal_Branch_2_2 jboss-portal-2.2
Build portal sources:
cd jboss-portal-2.2/build; ./build.sh (or Windows equivalent)
Build Migration Tool:
cd jboss-portal-2.2/migration; ./build.sh dist (or Windows equivalent)
After this steps you will have standalone distribution of Migration Tool in: jboss-portal-2.2/migration/output/dist/portal-migration
It is independant from portal sources so you can move it and run from anywhere
To do additional config
Provide jdbc connector jar for RDBMS and place it as:
"portal-migration/lib/jdbc-connector.jar"
Edit files following files:
"portal-migration/schema20/hibernate.cfg.xml"
"portal-migration/schema22/hibernate.cfg.xml"
and set up information for source and destination DB schema for migration
And that should be all!
Run migration
To run the DB migration: cd jboss-portal-2.2/migration/output/dist/portal-migration; ./run.sh (or the Windows equivalent, run.bat)
To run the descriptor migration:
cd jboss-portal-2.2/migration/output/dist/portal-migration
java -jar descriptor-migration.jar path-to-the-exploded-WAR-file-containing-the-descriptors-to-be-migrated
IMPORTANT!!!
It does schemaExport on destination DB so remember to BACKUP before playing with this.
It works in a rather simple way and currently doesn't output much "user friendly" information. So just look into the migrated DB to look for results.
Tuning
If want to change logging options you must do it in sources as log4j.properties file is placed inside of jar. You can find it in:
"jboss-portal-2.2/migration/src/resources/migration/log4j.properties"
Comments