Data Tools

You can use the Artemis CLI to execute data maintenance tools:

This is a list of sub-commands available

NameDescription
expExport the message data using a special and independent XML format
impImports the journal to a running broker using the output from expt
dataPrints a report about journal records and summary of existent records, as well a report on paging
recoverRevive data from the journal. It can be used in conjunction with historic journaling.
encodeshows an internal format of the journal encoded to String
decodeimports the internal journal format from encode

You can use the help at the tool for more information on how to execute each of the tools. For example:

  1. $ ./artemis help data print
  2. NAME
  3. artemis data print - Print data records information (WARNING: don't use
  4. while a production server is running)
  5. SYNOPSIS
  6. artemis data print [--bindings <binding>] [--broker <brokerConfig>]
  7. [--f] [--jdbc] [--jdbc-bindings-table-name <jdbcBindings>]
  8. [--jdbc-connection-url <jdbcURL>]
  9. [--jdbc-driver-class-name <jdbcClassName>]
  10. [--jdbc-large-message-table-name <jdbcLargeMessages>]
  11. [--jdbc-message-table-name <jdbcMessages>]
  12. [--jdbc-page-store-table-name <jdbcPageStore>] [--journal <journal>]
  13. [--large-messages <largeMessges>] [--output <output>]
  14. [--paging <paging>] [--safe] [--verbose] [--] [<configuration>]
  15. OPTIONS
  16. --bindings <binding>
  17. The folder used for bindings (default from broker.xml)
  18. --broker <brokerConfig>
  19. This would override the broker configuration from the bootstrap
  20. --f
  21. This will allow certain tools like print-data to be performed
  22. ignoring any running servers. WARNING: Changing data concurrently
  23. with a running broker may damage your data. Be careful with this
  24. option.
  25. --jdbc
  26. It will activate jdbc
  27. --jdbc-bindings-table-name <jdbcBindings>
  28. Name of the jdbc bindigns table
  29. --jdbc-connection-url <jdbcURL>
  30. The connection used for the database
  31. --jdbc-driver-class-name <jdbcClassName>
  32. JDBC driver classname
  33. --jdbc-large-message-table-name <jdbcLargeMessages>
  34. Name of the large messages table
  35. --jdbc-message-table-name <jdbcMessages>
  36. Name of the jdbc messages table
  37. --jdbc-page-store-table-name <jdbcPageStore>
  38. Name of the page sotre messages table
  39. --journal <journal>
  40. The folder used for messages journal (default from broker.xml)
  41. --large-messages <largeMessges>
  42. The folder used for large-messages (default from broker.xml)
  43. --output <output>
  44. Output name for the file
  45. --paging <paging>
  46. The folder used for paging (default from broker.xml)
  47. --safe
  48. It will print your data structure without showing your data
  49. --verbose
  50. Adds more information on the execution
  51. --
  52. This option can be used to separate command-line options from the
  53. list of argument, (useful when arguments might be mistaken for
  54. command-line options
  55. <configuration>
  56. Broker Configuration URI, default
  57. 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml'

For a full list of data tools commands available use:

  1. $ ./artemis help data
  2. NAME
  3. artemis data - data tools group (print|imp|exp|encode|decode|compact)
  4. (example ./artemis data print)
  5. SYNOPSIS
  6. artemis data
  7. artemis data compact [--verbose] [--paging <paging>]
  8. [--journal <journal>] [--large-messages <largeMessges>]
  9. [--broker <brokerConfig>] [--bindings <binding>]
  10. artemis data decode [--verbose] [--suffix <suffix>] [--paging <paging>]
  11. [--prefix <prefix>] [--file-size <size>] --input <input>
  12. [--journal <journal>] [--directory <directory>]
  13. [--large-messages <largeMessges>] [--broker <brokerConfig>]
  14. [--bindings <binding>]
  15. artemis data encode [--verbose] [--directory <directory>]
  16. [--suffix <suffix>] [--paging <paging>] [--prefix <prefix>]
  17. [--file-size <size>] [--journal <journal>]
  18. [--large-messages <largeMessges>] [--broker <brokerConfig>]
  19. [--bindings <binding>]
  20. artemis data exp [--jdbc-bindings-table-name <jdbcBindings>]
  21. [--jdbc-message-table-name <jdbcMessages>] [--paging <paging>]
  22. [--jdbc-connection-url <jdbcURL>]
  23. [--jdbc-large-message-table-name <jdbcLargeMessages>] [--f]
  24. [--large-messages <largeMessges>] [--broker <brokerConfig>]
  25. [--jdbc-page-store-table-name <jdbcPageStore>]
  26. [--jdbc-driver-class-name <jdbcClassName>] [--jdbc] [--verbose]
  27. [--journal <journal>] [--output <output>] [--bindings <binding>]
  28. artemis data imp [--user <user>] [--legacy-prefixes] [--verbose]
  29. [--host <host>] [--port <port>] [--transaction] --input <input>
  30. [--password <password>] [--sort]
  31. artemis data print [--jdbc-bindings-table-name <jdbcBindings>]
  32. [--jdbc-message-table-name <jdbcMessages>] [--paging <paging>]
  33. [--jdbc-connection-url <jdbcURL>]
  34. [--jdbc-large-message-table-name <jdbcLargeMessages>] [--f]
  35. [--large-messages <largeMessges>] [--broker <brokerConfig>]
  36. [--jdbc-page-store-table-name <jdbcPageStore>]
  37. [--jdbc-driver-class-name <jdbcClassName>] [--safe] [--jdbc] [--verbose]
  38. [--journal <journal>] [--output <output>] [--bindings <binding>]
  39. COMMANDS
  40. With no arguments, Display help information
  41. print
  42. Print data records information (WARNING: don't use while a
  43. production server is running)
  44. With --jdbc-bindings-table-name option, Name of the jdbc bindigns
  45. table
  46. With --jdbc-message-table-name option, Name of the jdbc messages
  47. table
  48. With --paging option, The folder used for paging (default from
  49. broker.xml)
  50. With --jdbc-connection-url option, The connection used for the
  51. database
  52. With --jdbc-large-message-table-name option, Name of the large
  53. messages table
  54. With --f option, This will allow certain tools like print-data to be
  55. performed ignoring any running servers. WARNING: Changing data
  56. concurrently with a running broker may damage your data. Be careful
  57. with this option.
  58. With --large-messages option, The folder used for large-messages
  59. (default from broker.xml)
  60. With --broker option, This would override the broker configuration
  61. from the bootstrap
  62. With --jdbc-page-store-table-name option, Name of the page sotre
  63. messages table
  64. With --jdbc-driver-class-name option, JDBC driver classname
  65. With --safe option, It will print your data structure without
  66. showing your data
  67. With --jdbc option, It will activate jdbc
  68. With --verbose option, Adds more information on the execution
  69. With --journal option, The folder used for messages journal (default
  70. from broker.xml)
  71. With --output option, Output name for the file
  72. With --bindings option, The folder used for bindings (default from
  73. broker.xml)
  74. exp
  75. Export all message-data using an XML that could be interpreted by
  76. any system.
  77. With --jdbc-bindings-table-name option, Name of the jdbc bindigns
  78. table
  79. With --jdbc-message-table-name option, Name of the jdbc messages
  80. table
  81. With --paging option, The folder used for paging (default from
  82. broker.xml)
  83. With --jdbc-connection-url option, The connection used for the
  84. database
  85. With --jdbc-large-message-table-name option, Name of the large
  86. messages table
  87. With --f option, This will allow certain tools like print-data to be
  88. performed ignoring any running servers. WARNING: Changing data
  89. concurrently with a running broker may damage your data. Be careful
  90. with this option.
  91. With --large-messages option, The folder used for large-messages
  92. (default from broker.xml)
  93. With --broker option, This would override the broker configuration
  94. from the bootstrap
  95. With --jdbc-page-store-table-name option, Name of the page sotre
  96. messages table
  97. With --jdbc-driver-class-name option, JDBC driver classname
  98. With --jdbc option, It will activate jdbc
  99. With --verbose option, Adds more information on the execution
  100. With --journal option, The folder used for messages journal (default
  101. from broker.xml)
  102. With --output option, Output name for the file
  103. With --bindings option, The folder used for bindings (default from
  104. broker.xml)
  105. imp
  106. Import all message-data using an XML that could be interpreted by
  107. any system.
  108. With --user option, User name used to import the data. (default
  109. null)
  110. With --legacy-prefixes option, Do not remove prefixes from legacy
  111. imports
  112. With --verbose option, Adds more information on the execution
  113. With --host option, The host used to import the data (default
  114. localhost)
  115. With --port option, The port used to import the data (default 61616)
  116. With --transaction option, If this is set to true you will need a
  117. whole transaction to commit at the end. (default false)
  118. With --input option, The input file name (default=exp.dmp)
  119. With --password option, User name used to import the data. (default
  120. null)
  121. With --sort option, Sort the messages from the input (used for older
  122. versions that won't sort messages)
  123. decode
  124. Decode a journal's internal format into a new journal set of files
  125. With --verbose option, Adds more information on the execution
  126. With --suffix option, The journal suffix (default amq)
  127. With --paging option, The folder used for paging (default from
  128. broker.xml)
  129. With --prefix option, The journal prefix (default activemq-data)
  130. With --file-size option, The journal size (default 10485760)
  131. With --input option, The input file name (default=exp.dmp)
  132. With --journal option, The folder used for messages journal (default
  133. from broker.xml)
  134. With --directory option, The journal folder (default journal folder
  135. from broker.xml)
  136. With --large-messages option, The folder used for large-messages
  137. (default from broker.xml)
  138. With --broker option, This would override the broker configuration
  139. from the bootstrap
  140. With --bindings option, The folder used for bindings (default from
  141. broker.xml)
  142. encode
  143. Encode a set of journal files into an internal encoded data format
  144. With --verbose option, Adds more information on the execution
  145. With --directory option, The journal folder (default the journal
  146. folder from broker.xml)
  147. With --suffix option, The journal suffix (default amq)
  148. With --paging option, The folder used for paging (default from
  149. broker.xml)
  150. With --prefix option, The journal prefix (default activemq-data)
  151. With --file-size option, The journal size (default 10485760)
  152. With --journal option, The folder used for messages journal (default
  153. from broker.xml)
  154. With --large-messages option, The folder used for large-messages
  155. (default from broker.xml)
  156. With --broker option, This would override the broker configuration
  157. from the bootstrap
  158. With --bindings option, The folder used for bindings (default from
  159. broker.xml)
  160. compact
  161. Compacts the journal of a non running server
  162. With --verbose option, Adds more information on the execution
  163. With --paging option, The folder used for paging (default from
  164. broker.xml)
  165. With --journal option, The folder used for messages journal (default
  166. from broker.xml)
  167. With --large-messages option, The folder used for large-messages
  168. (default from broker.xml)
  169. With --broker option, This would override the broker configuration
  170. from the bootstrap
  171. With --bindings option, The folder used for bindings (default from
  172. broker.xml)