Migrate Openfire to new server

I have installed OpenFire 3.10.0 on Ubuntu 12.04.

As the database is used PosgreSQL.

I need to move OpenFire server to the new server on Ubuntu 14.04.

Using the Google search I found many instructions, but mostly they refer to one https://community.igniterealtime.org/docs/DOC-1994

Taking advantage of these instructions I:

  • Set the new server OpenFire 3.10.0 and PosgreSQL.

  • Stop the service OpenFire.

  • Transfer the database PosgreSQL;

  • Appointed a new user PosgreSQL rights on the database.

  • But I have in the /opt directory is missing openfire.

  • The file search found on the file system where the file openfire.xml (/etc/openfire).

  • Copy the folder /etc/openfire from the old server to the new one.

  • Change in /etc/openfire/openfire.xml login and password database using plain text;

  • After the above steps, the server is started, and offers installation … when you connect to the database an error is The Openfire database schema does not appear to be installed. Follow the installation guide to fix this error.

In /var/log/openfire/error.log log the following error:

2015.04.28 18:12:06 org.jivesoftware.util.XMLProperties - Unable to save XML properties; no file specified
2015.04.28 18:12:06 org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL: CREATE TABLE ofUser (   username              VARCHAR(64)     NOT NULL,   plainPassword         VARCHAR(32),   encryptedPassword     VARCHAR(255),   name                  VARCHAR(100),   email                 VARCHAR(100),   creationDate          CHAR(15)        NOT NULL,   modificationDate      CHAR(15)        NOT NULL,   CONSTRAINT ofUser_pk PRIMARY KEY (username) );
2015.04.28 18:12:06 org.jivesoftware.database.SchemaManager - ERROR: relation "ofuser" already exists
org.postgresql.util.PSQLException: ERROR: relation "ofuser" already exists
  at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
  at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
  at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
  at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
  at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
  at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:413)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
  at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
  at org.postgresql.PGStatement$$EnhancerByProxool$$2687ebca.execute(<generated>)
  at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:408)
  at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:244)
  at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java:92)
  at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectionManager.java:621)
  at org.jivesoftware.openfire.admin.setup.setup_002ddatasource_002dstandard_jsp._jspService(setup_002ddatasource_002dstandard_jsp.java:206)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
  at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
  at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
  at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
  at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:50)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
  at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
  at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:159)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
  at org.eclipse.jetty.server.Server.handle(Server.java:497)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
  at java.lang.Thread.run(Thread.java:745)
2015.04.28 18:12:06 org.jivesoftware.util.XMLProperties - Unable to save XML properties; no file specified

Probably there is a problem in that the use Property Encryption Key, which is stored in a different location.

Please help me to migrate my OpenFire to new server.

In OpenFire i have 1181 user in a 136 groups, and i don`t want to create and group them manual again…

PS. Sorry for my english … I translated using google translator.