| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta name="generator" content="Asciidoctor 2.0.18"> |
| <link rel="icon" type="image/png" href="images/favicon.png"> |
| <title>Data Tools</title> |
| <link rel="stylesheet" href="css/asciidoctor.css"> |
| <link rel="stylesheet" href="css/font-awesome.css"> |
| <link rel="stylesheet" href="css/rouge-github.css"> |
| </head> |
| <body class="book"> |
| <div id="header"> |
| <h1>Data Tools</h1> |
| </div> |
| <div id="content"> |
| <div id="preamble"> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>You can use the Artemis CLI to execute data maintenance tools:</p> |
| </div> |
| <div class="paragraph"> |
| <p>The following sub-commands are available when running the CLI data command from a particular broker instance that has already been installed using the create command:</p> |
| </div> |
| <table class="tableblock frame-all grid-all stretch"> |
| <colgroup> |
| <col style="width: 50%;"> |
| <col style="width: 50%;"> |
| </colgroup> |
| <thead> |
| <tr> |
| <th class="tableblock halign-left valign-top">Name</th> |
| <th class="tableblock halign-left valign-top">Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">print</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Prints a report about journal records of a non-running server</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">exp</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Export the message data using a special and independent XML format</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">imp</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Imports the journal to a running broker using the output from expt</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">encode</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">shows an internal format of the journal encoded to String</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">decode</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">imports the internal journal format from encode</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">compact</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Compacts the journal of a non running server</p></td> |
| </tr> |
| <tr> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">recover</p></td> |
| <td class="tableblock halign-left valign-top"><p class="tableblock">Recover (undelete) messages from an existing journal and create a new one.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="paragraph"> |
| <p>You can use the CLI help for more information on how to execute each of the tools. |
| For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight nowrap"><code data-lang="console"><span class="gp">$</span><span class="w"> </span>./artemis <span class="nb">help </span>data print |
| <span class="go">NAME |
| artemis data print - Print data records information (WARNING: don't use |
| while a production server is running) |
| |
| SYNOPSIS |
| </span><span class="gp"> artemis data print [--bindings <binding></span><span class="o">]</span> <span class="o">[</span><span class="nt">--broker</span> <brokerConfig>] |
| <span class="gp"> [--f] [--jdbc] [--jdbc-bindings-table-name <jdbcBindings></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-connection-url <jdbcURL></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-driver-class-name <jdbcClassName></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-large-message-table-name <jdbcLargeMessages></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-message-table-name <jdbcMessages></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-node-manager-table-name <jdbcNodeManager></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-page-store-table-name <jdbcPageStore></span><span class="o">]</span> <span class="o">[</span><span class="nt">--journal</span> <journal>] |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> <span class="o">[</span><span class="nt">--output</span> <output>] |
| <span class="gp"> [--paging <paging></span><span class="o">]</span> <span class="o">[</span><span class="nt">--reclaimed</span><span class="o">]</span> <span class="o">[</span><span class="nt">--safe</span><span class="o">]</span> <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> <span class="o">[</span><span class="nt">--</span><span class="o">]</span> |
| <span class="gp"> [<configuration></span><span class="o">]</span> |
| <span class="go"> |
| OPTIONS |
| </span><span class="gp"> --bindings <binding></span><span class="w"> |
| </span><span class="go"> The folder used for bindings (default from broker.xml) |
| |
| </span><span class="gp"> --broker <brokerConfig></span><span class="w"> |
| </span><span class="go"> This would override the broker configuration from the bootstrap |
| |
| --f |
| This will allow certain tools like print-data to be performed |
| ignoring any running servers. WARNING: Changing data concurrently |
| with a running broker may damage your data. Be careful with this |
| option. |
| |
| --jdbc |
| It will activate jdbc |
| |
| </span><span class="gp"> --jdbc-bindings-table-name <jdbcBindings></span><span class="w"> |
| </span><span class="go"> Name of the jdbc bindigns table |
| |
| </span><span class="gp"> --jdbc-connection-url <jdbcURL></span><span class="w"> |
| </span><span class="go"> The connection used for the database |
| |
| </span><span class="gp"> --jdbc-driver-class-name <jdbcClassName></span><span class="w"> |
| </span><span class="go"> JDBC driver classname |
| |
| </span><span class="gp"> --jdbc-large-message-table-name <jdbcLargeMessages></span><span class="w"> |
| </span><span class="go"> Name of the large messages table |
| |
| </span><span class="gp"> --jdbc-message-table-name <jdbcMessages></span><span class="w"> |
| </span><span class="go"> Name of the jdbc messages table |
| |
| </span><span class="gp"> --jdbc-node-manager-table-name <jdbcNodeManager></span><span class="w"> |
| </span><span class="go"> Name of the jdbc node manager table |
| |
| </span><span class="gp"> --jdbc-page-store-table-name <jdbcPageStore></span><span class="w"> |
| </span><span class="go"> Name of the page store messages table |
| |
| </span><span class="gp"> --journal <journal></span><span class="w"> |
| </span><span class="go"> The folder used for messages journal (default from broker.xml) |
| |
| </span><span class="gp"> --large-messages <largeMessges></span><span class="w"> |
| </span><span class="go"> The folder used for large-messages (default from broker.xml) |
| |
| </span><span class="gp"> --output <output></span><span class="w"> |
| </span><span class="go"> Output name for the file |
| |
| </span><span class="gp"> --paging <paging></span><span class="w"> |
| </span><span class="go"> The folder used for paging (default from broker.xml) |
| |
| --reclaimed |
| This option will try to print as many records as possible from |
| reclaimed files |
| |
| --safe |
| It will print your data structure without showing your data |
| |
| --verbose |
| Adds more information on the execution |
| |
| -- |
| This option can be used to separate command-line options from the |
| list of argument, (useful when arguments might be mistaken for |
| command-line options |
| |
| </span><span class="gp"> <configuration></span><span class="w"> |
| </span><span class="go"> Broker Configuration URI, default |
| </span><span class="gp"> 'xml:$</span><span class="o">{</span>ARTEMIS_INSTANCE<span class="o">}</span>/etc/bootstrap.xml<span class="s1">'</span></code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>For a full list of data tools commands available use:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight nowrap"><code data-lang="console"><span class="gp">$</span><span class="w"> </span>./artemis <span class="nb">help </span>data |
| <span class="go">NAME |
| artemis data - data tools group |
| (print|imp|exp|encode|decode|compact|recover) (example ./artemis data |
| print) |
| |
| SYNOPSIS |
| artemis data |
| </span><span class="gp"> artemis data compact [--journal <journal></span><span class="o">]</span> |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> <span class="o">[</span><span class="nt">--paging</span> <paging>] |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--bindings</span> <binding>] <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> |
| <span class="gp"> artemis data decode [--journal <journal></span><span class="o">]</span> |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> <span class="o">[</span><span class="nt">--file-size</span> <size>] |
| <span class="gp"> [--paging <paging></span><span class="o">]</span> <span class="o">[</span><span class="nt">--prefix</span> <prefix>] <span class="o">[</span><span class="nt">--suffix</span> <suffix>] |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--directory</span> <directory>] |
| <span class="gp"> [--bindings <binding></span><span class="o">]</span> <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> <span class="nt">--input</span> <input> |
| <span class="gp"> artemis data encode [--journal <journal></span><span class="o">]</span> |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> <span class="o">[</span><span class="nt">--file-size</span> <size>] |
| <span class="gp"> [--paging <paging></span><span class="o">]</span> <span class="o">[</span><span class="nt">--prefix</span> <prefix>] <span class="o">[</span><span class="nt">--suffix</span> <suffix>] |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--bindings</span> <binding>] <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> |
| <span class="gp"> [--directory <directory></span><span class="o">]</span> |
| <span class="gp"> artemis data exp [--jdbc-driver-class-name <jdbcClassName></span><span class="o">]</span> |
| <span class="gp"> [--journal <journal></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc-connection-url</span> <jdbcURL>] |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-bindings-table-name <jdbcBindings></span><span class="o">]</span> <span class="o">[</span><span class="nt">--paging</span> <paging>] <span class="o">[</span><span class="nt">--f</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-large-message-table-name <jdbcLargeMessages></span><span class="o">]</span> |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc-page-store-table-name</span> <jdbcPageStore>] |
| <span class="gp"> [--bindings <binding></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc</span><span class="o">]</span> <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-message-table-name <jdbcMessages></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-node-manager-table-name <jdbcNodeManager></span><span class="o">]</span> <span class="o">[</span><span class="nt">--output</span> <output>] |
| <span class="gp"> artemis data imp [--legacy-prefixes] [--password <password></span><span class="o">]</span> |
| <span class="gp"> [--transaction] [--verbose] [--port <port></span><span class="o">]</span> <span class="o">[</span><span class="nt">--user</span> <user>] <span class="o">[</span><span class="nt">--sort</span><span class="o">]</span> |
| <span class="gp"> --input <input></span><span class="w"> </span><span class="o">[</span><span class="nt">--host</span> <host>] |
| <span class="go"> artemis data print [--reclaimed] |
| </span><span class="gp"> [--jdbc-driver-class-name <jdbcClassName></span><span class="o">]</span> <span class="o">[</span><span class="nt">--journal</span> <journal>] |
| <span class="gp"> [--jdbc-connection-url <jdbcURL></span><span class="o">]</span> <span class="o">[</span><span class="nt">--large-messages</span> <largeMessges>] |
| <span class="gp"> [--jdbc-bindings-table-name <jdbcBindings></span><span class="o">]</span> <span class="o">[</span><span class="nt">--paging</span> <paging>] <span class="o">[</span><span class="nt">--f</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-large-message-table-name <jdbcLargeMessages></span><span class="o">]</span> <span class="o">[</span><span class="nt">--safe</span><span class="o">]</span> |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc-page-store-table-name</span> <jdbcPageStore>] |
| <span class="gp"> [--bindings <binding></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc</span><span class="o">]</span> <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-message-table-name <jdbcMessages></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-node-manager-table-name <jdbcNodeManager></span><span class="o">]</span> <span class="o">[</span><span class="nt">--output</span> <output>] |
| <span class="gp"> artemis data recover [--jdbc-driver-class-name <jdbcClassName></span><span class="o">]</span> |
| <span class="gp"> [--journal <journal></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc-connection-url</span> <jdbcURL>] |
| <span class="gp"> [--large-messages <largeMessges></span><span class="o">]</span> <span class="o">[</span><span class="nt">--reclaimed</span><span class="o">]</span> <span class="nt">--target</span> <outputJournal> |
| <span class="gp"> [--jdbc-bindings-table-name <jdbcBindings></span><span class="o">]</span> <span class="o">[</span><span class="nt">--paging</span> <paging>] <span class="o">[</span><span class="nt">--f</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-large-message-table-name <jdbcLargeMessages></span><span class="o">]</span> |
| <span class="gp"> [--broker <brokerConfig></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc-page-store-table-name</span> <jdbcPageStore>] |
| <span class="gp"> [--bindings <binding></span><span class="o">]</span> <span class="o">[</span><span class="nt">--jdbc</span><span class="o">]</span> <span class="o">[</span><span class="nt">--verbose</span><span class="o">]</span> |
| <span class="gp"> [--jdbc-message-table-name <jdbcMessages></span><span class="o">]</span> |
| <span class="gp"> [--jdbc-node-manager-table-name <jdbcNodeManager></span><span class="o">]</span> <span class="o">[</span><span class="nt">--output</span> <output>] |
| <span class="go"> |
| COMMANDS |
| With no arguments, Display help information |
| |
| recover |
| Recover (undelete) every message on the journal by creating a new |
| output journal. Rolled backed and acked messages will be sent out to |
| the output as much as possible. |
| |
| With --jdbc-driver-class-name option, JDBC driver classname |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --jdbc-connection-url option, The connection used for the |
| database |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --reclaimed option, This option will try to recover as many |
| records as possible from reclaimed files |
| |
| With --target option, Output folder container the new journal with |
| all the generated messages |
| |
| With --jdbc-bindings-table-name option, Name of the jdbc bindigns |
| table |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --f option, This will allow certain tools like print-data to be |
| performed ignoring any running servers. WARNING: Changing data |
| concurrently with a running broker may damage your data. Be careful |
| with this option. |
| |
| With --jdbc-large-message-table-name option, Name of the large |
| messages table |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --jdbc-page-store-table-name option, Name of the page store |
| messages table |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --jdbc option, It will activate jdbc |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --jdbc-message-table-name option, Name of the jdbc messages |
| table |
| |
| With --jdbc-node-manager-table-name option, Name of the jdbc node |
| manager table |
| |
| With --output option, Output name for the file |
| |
| print |
| Print data records information (WARNING: don't use while a |
| production server is running) |
| |
| With --reclaimed option, This option will try to print as many |
| records as possible from reclaimed files |
| |
| With --jdbc-driver-class-name option, JDBC driver classname |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --jdbc-connection-url option, The connection used for the |
| database |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --jdbc-bindings-table-name option, Name of the jdbc bindigns |
| table |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --f option, This will allow certain tools like print-data to be |
| performed ignoring any running servers. WARNING: Changing data |
| concurrently with a running broker may damage your data. Be careful |
| with this option. |
| |
| With --jdbc-large-message-table-name option, Name of the large |
| messages table |
| |
| With --safe option, It will print your data structure without |
| showing your data |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --jdbc-page-store-table-name option, Name of the page store |
| messages table |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --jdbc option, It will activate jdbc |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --jdbc-message-table-name option, Name of the jdbc messages |
| table |
| |
| With --jdbc-node-manager-table-name option, Name of the jdbc node |
| manager table |
| |
| With --output option, Output name for the file |
| |
| exp |
| Export all message-data using an XML that could be interpreted by |
| any system. |
| |
| With --jdbc-driver-class-name option, JDBC driver classname |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --jdbc-connection-url option, The connection used for the |
| database |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --jdbc-bindings-table-name option, Name of the jdbc bindigns |
| table |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --f option, This will allow certain tools like print-data to be |
| performed ignoring any running servers. WARNING: Changing data |
| concurrently with a running broker may damage your data. Be careful |
| with this option. |
| |
| With --jdbc-large-message-table-name option, Name of the large |
| messages table |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --jdbc-page-store-table-name option, Name of the page store |
| messages table |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --jdbc option, It will activate jdbc |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --jdbc-message-table-name option, Name of the jdbc messages |
| table |
| |
| With --jdbc-node-manager-table-name option, Name of the jdbc node |
| manager table |
| |
| With --output option, Output name for the file |
| |
| imp |
| Import all message-data using an XML that could be interpreted by |
| any system. |
| |
| With --legacy-prefixes option, Do not remove prefixes from legacy |
| imports |
| |
| With --password option, User name used to import the data. (default |
| null) |
| |
| With --transaction option, If this is set to true you will need a |
| whole transaction to commit at the end. (default false) |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --port option, The port used to import the data (default 61616) |
| |
| With --user option, User name used to import the data. (default |
| null) |
| |
| With --sort option, Sort the messages from the input (used for older |
| versions that won't sort messages) |
| |
| With --input option, The input file name (default=exp.dmp) |
| |
| With --host option, The host used to import the data (default |
| localhost) |
| |
| decode |
| Decode a journal's internal format into a new journal set of files |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --file-size option, The journal size (default 10485760) |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --prefix option, The journal prefix (default activemq-data) |
| |
| With --suffix option, The journal suffix (default amq) |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --directory option, The journal folder (default journal folder |
| from broker.xml) |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --input option, The input file name (default=exp.dmp) |
| |
| encode |
| Encode a set of journal files into an internal encoded data format |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --file-size option, The journal size (default 10485760) |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --prefix option, The journal prefix (default activemq-data) |
| |
| With --suffix option, The journal suffix (default amq) |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --verbose option, Adds more information on the execution |
| |
| With --directory option, The journal folder (default the journal |
| folder from broker.xml) |
| |
| compact |
| Compacts the journal of a non running server |
| |
| With --journal option, The folder used for messages journal (default |
| from broker.xml) |
| |
| With --large-messages option, The folder used for large-messages |
| (default from broker.xml) |
| |
| With --paging option, The folder used for paging (default from |
| broker.xml) |
| |
| With --broker option, This would override the broker configuration |
| from the bootstrap |
| |
| With --bindings option, The folder used for bindings (default from |
| broker.xml) |
| |
| With --verbose option, Adds more information on the execution</span></code></pre> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |