I have exported Keycloak Mongo db from 1.9.8 and successfully imported
to H2 db in the same 1.9.8 Keycloak version. Then I have tried to export
it back again and import with PostgreSQL, but it failed at:
13:44:33,341 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(ServerService Thread Pool -- 47) SQL Error: 0, SQLState: 42703
13:44:33,342 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(ServerService Thread Pool -- 47) ERROR: column realmentit0_.certificate
does not exist
Position: 563
Also I have copied H2 db files (keycloak.h2.db keycloak.trace.db
keycloak.trace.db.old) to the 2.0.0, but unfortunately it won't start:
14:19:17,717 INFO [org.hibernate.dialect.Dialect] (ServerService Thread
Pool -- 46) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
14:19:17,732 WARN [org.hibernate.dialect.H2Dialect] (ServerService
Thread Pool -- 46) HHH000431: Unable to determine H2 database version,
certain features may not work
14:19:17,799 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl]
(ServerService Thread Pool -- 46) Envers integration enabled? : true
14:19:18,900 INFO [org.hibernate.validator.internal.util.Version]
(ServerService Thread Pool -- 46) HV000001: Hibernate Validator 5.2.3.Final
14:19:20,370 INFO
[org.hibernate.hql.internal.QueryTranslatorFactoryInitiator]
(ServerService Thread Pool -- 46) HHH000397: Using ASTQueryTranslatorFactory
14:19:24,582 ERROR [org.keycloak.services] (ServerService Thread Pool --
46) KC-SERVICES0002: Failed to migrate datamodel:
java.lang.NullPointerException
On 01/08/17 17:17, Bill Burke wrote:
export/import is the only way. Migrating from 1.9.8 to 2.5.5, then
doing the export might be the trick. At least from a product
perspective we'll need to support migration from 1.9.8->2.5.5->3.x so
please post your export/import errors.
On 8/1/17 10:27 AM, K K wrote:
> Hi,
> I am struggling with Keycloak migration from version 1.9.8 to the latest one.
Currently I am at 2.4.0 and still MongoDB. Is there any built-in tool to migrate MongoDB
db to PostgreSQL?
>
> I have tried import and then export, but it doesn't work or I did mistake
somewhere.
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
skype. kamil.kapturkiewicz
tel/signal. +44 758 306 8467