The embedded database openfire uses is Hsqldb, written in Java. Openfire has a sort of migration-guide, but it is not exactly complete. First of all the program mentioned there, hsqldb-transfer, is:
- A GUI program...
- That must be run as the same user as the owner of the hsqldb database. Read and write-access is insufficient?!
If openfire is running on a server with no graphics, this means:
- Turning off the server on machine one
- Copying Path-To/embedded-db over an (offline) openfire-installation on machine two, which happens to also have graphics and the same openfire-setup as machine one (same plugins, version etc.)
- Starting openfire on machine two
- Restarting the setup-wizard so that the copied database is recognized
- Shutting off openfire on machine two
- "Upgrading" the user that runs openfire on machine two to be a fully fledged human user
- Logging in as the openfire user
- ... but since openfire is off, the database is now not on disk... which means that
- Running hsqldb-transfer to transfer the database
does not work.
In the guide the url jdbc:hsqldb:Path-To/embedded-db/openfire is used. Problem is: sometimes that file is there, other times it isn't. In my case: it was there on Monday when I did a dry-run without turning off openfire on machine one, it was missing today, when I did turn off openfire.
(The next steps in my successfull dry run was:
- While transferring, change datatypes not supported in the new server on the fly, as hsqldb-transfer itself is incapable of mapping between sql dialects
- Manually run the database-alterations on the external sql-server to get to the desired version (easy, since the existing version is in the table version). I went from 3.5.2 to 3.6.4...
- Dump the contents of that database and do an import on super sql server machine three, which is shiny and new
- Set up openfire on machine four, which is not so old that it's falling to pieces, to use the external database on three
How does one get a hold of an offline, not being updated copy of the database such that hsqldb-transfer can use it?