Domanda

We have an instance of Confluence that was running on an HSQLDB.

Something has gone badly wrong, and for some reasons transactions were being stacked up in the log, but not committed to the database. We were taking VM snapshots every two hours, but when you restart the VM it wipes the log.

So we now have a database that is one week out of date, along with a log file of every transaction that every user has done in the past week (i.e. every page they've written/edited in Confluence).

Does anyone know how I can apply these HSQL transactions to the database to bring it back up to date. Else anybody know how I can tell the whole company that they've lost a week's worth of work on Confluence?

As a result of this, we've now migrated to SQL, and reviewed the VM backup procedures, so we should be ok moving forward, but I really want to recover this work - it's tantalisingly close....

thanks,

È stato utile?

Soluzione

It is possible to do this.

  1. Turn off Confluence (or any application that is using the database).
  2. Modify the .properties file of the database with the setting modified=yes instead of modified=no
  3. Put the .log file that you want to execute alongside the .properties and .script files of the database.
  4. Run the DatabaseManager app or the SqlTool command line app or other GUI manager with a large JVM max memory allocation, and the hsqldb jar (this must be a recent version of the jar).
  5. Connect to the database as a file: database with the property below added to connection string:

This is a sample URL:

 jdbc:hsqldb:file:<your filepath ending with name of databases>;hqldb.full_log_replay=true

If there is an error in connection, it will show the line number of the .log file where there is the error.

If there is an error, edit the log file at that point. But it is likely that memory runs out due to the database being all-in-memory and your data increasing over time.

There is a simple way to connect to a database used by Confluence and change some of the tables to CACHED tables, which are disk based and do not use much memory.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top