13.5. Import/Export the Journal Data

You may want to inspect the existent records on each one of the journals used by HornetQ, and you can use the export/import tool for that purpose. The export/import are classes located in the hornetq-core.jar, you can export the journal as a text file by using this command:
java -cp hornetq-core.jar org.hornetq.core.journal.impl.ExportJournal <JournalDirectory> <JournalPrefix> <FileExtension> <FileSize> <FileOutput>
To import the file as binary data on the journal (Notice you also require netty.jar):
java -cp hornetq-core.jar:netty.jar org.hornetq.core.journal.impl.ImportJournal <JournalDirectory> <JournalPrefix> <FileExtension> <FileSize> <FileInput>
  • JournalDirectory: Use the configured folder for your selected folder. Example: ./hornetq/data/journal
  • JournalPrefix: Use the prefix for your selected journal, as discussed
  • FileExtension: Use the extension for your selected journal, as discussed
  • FileSize: Use the size for your selected journal, as discussed
  • FileOutput: text file that will contain the exported data