# Data Tools You can use the Artemis CLI to execute data maintenance tools: This is a list of sub-commands available Name | Description ---|--- exp | Export the message data using a special and independent XML format imp | Imports the journal to a running broker using the output from expt data | Prints a report about journal records and summary of existent records, as well a report on paging encode | shows an internal format of the journal encoded to String decode | imports 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: ``` $ ./artemis help data print NAME artemis data print - Print data records information (WARNING: don't use while a production server is running) SYNOPSIS artemis data print [--bindings ] [--broker ] [--f] [--jdbc] [--jdbc-bindings-table-name ] [--jdbc-connection-url ] [--jdbc-driver-class-name ] [--jdbc-large-message-table-name ] [--jdbc-message-table-name ] [--jdbc-page-store-table-name ] [--journal ] [--large-messages ] [--output ] [--paging ] [--safe] [--verbose] [--] [] OPTIONS --bindings The folder used for bindings (default from broker.xml) --broker 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 --jdbc-bindings-table-name Name of the jdbc bindigns table --jdbc-connection-url The connection used for the database --jdbc-driver-class-name JDBC driver classname --jdbc-large-message-table-name Name of the large messages table --jdbc-message-table-name Name of the jdbc messages table --jdbc-page-store-table-name Name of the page sotre messages table --journal The folder used for messages journal (default from broker.xml) --large-messages The folder used for large-messages (default from broker.xml) --output Output name for the file --paging The folder used for paging (default from broker.xml) --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 Broker Configuration URI, default 'xml:${ARTEMIS_INSTANCE}/etc/bootstrap.xml' ``` For a full list of data tools commands available use: ``` $ ./artemis help data NAME artemis data - data tools group (print|imp|exp|encode|decode|compact) (example ./artemis data print) SYNOPSIS artemis data artemis data compact [--verbose] [--paging ] [--journal ] [--large-messages ] [--broker ] [--bindings ] artemis data decode [--verbose] [--suffix ] [--paging ] [--prefix ] [--file-size ] --input [--journal ] [--directory ] [--large-messages ] [--broker ] [--bindings ] artemis data encode [--verbose] [--directory ] [--suffix ] [--paging ] [--prefix ] [--file-size ] [--journal ] [--large-messages ] [--broker ] [--bindings ] artemis data exp [--jdbc-bindings-table-name ] [--jdbc-message-table-name ] [--paging ] [--jdbc-connection-url ] [--jdbc-large-message-table-name ] [--f] [--large-messages ] [--broker ] [--jdbc-page-store-table-name ] [--jdbc-driver-class-name ] [--jdbc] [--verbose] [--journal ] [--output ] [--bindings ] artemis data imp [--user ] [--legacy-prefixes] [--verbose] [--host ] [--port ] [--transaction] --input [--password ] [--sort] artemis data print [--jdbc-bindings-table-name ] [--jdbc-message-table-name ] [--paging ] [--jdbc-connection-url ] [--jdbc-large-message-table-name ] [--f] [--large-messages ] [--broker ] [--jdbc-page-store-table-name ] [--jdbc-driver-class-name ] [--safe] [--jdbc] [--verbose] [--journal ] [--output ] [--bindings ] COMMANDS With no arguments, Display help information print Print data records information (WARNING: don't use while a production server is running) With --jdbc-bindings-table-name option, Name of the jdbc bindigns table With --jdbc-message-table-name option, Name of the jdbc messages table With --paging option, The folder used for paging (default from broker.xml) With --jdbc-connection-url option, The connection used for the database With --jdbc-large-message-table-name option, Name of the large messages table 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 --large-messages option, The folder used for large-messages (default from broker.xml) With --broker option, This would override the broker configuration from the bootstrap With --jdbc-page-store-table-name option, Name of the page sotre messages table With --jdbc-driver-class-name option, JDBC driver classname With --safe option, It will print your data structure without showing your data With --jdbc option, It will activate jdbc With --verbose option, Adds more information on the execution With --journal option, The folder used for messages journal (default from broker.xml) With --output option, Output name for the file With --bindings option, The folder used for bindings (default from broker.xml) exp Export all message-data using an XML that could be interpreted by any system. With --jdbc-bindings-table-name option, Name of the jdbc bindigns table With --jdbc-message-table-name option, Name of the jdbc messages table With --paging option, The folder used for paging (default from broker.xml) With --jdbc-connection-url option, The connection used for the database With --jdbc-large-message-table-name option, Name of the large messages table 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 --large-messages option, The folder used for large-messages (default from broker.xml) With --broker option, This would override the broker configuration from the bootstrap With --jdbc-page-store-table-name option, Name of the page sotre messages table With --jdbc-driver-class-name option, JDBC driver classname With --jdbc option, It will activate jdbc With --verbose option, Adds more information on the execution With --journal option, The folder used for messages journal (default from broker.xml) With --output option, Output name for the file With --bindings option, The folder used for bindings (default from broker.xml) imp Import all message-data using an XML that could be interpreted by any system. With --user option, User name used to import the data. (default null) With --legacy-prefixes option, Do not remove prefixes from legacy imports With --verbose option, Adds more information on the execution With --host option, The host used to import the data (default localhost) With --port option, The port used to import the data (default 61616) With --transaction option, If this is set to true you will need a whole transaction to commit at the end. (default false) With --input option, The input file name (default=exp.dmp) With --password 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) decode Decode a journal's internal format into a new journal set of files With --verbose option, Adds more information on the execution With --suffix option, The journal suffix (default amq) With --paging option, The folder used for paging (default from broker.xml) With --prefix option, The journal prefix (default activemq-data) With --file-size option, The journal size (default 10485760) With --input option, The input file name (default=exp.dmp) With --journal option, The folder used for messages journal (default from broker.xml) With --directory option, The journal folder (default journal folder from broker.xml) With --large-messages option, The folder used for large-messages (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) encode Encode a set of journal files into an internal encoded data format With --verbose option, Adds more information on the execution With --directory option, The journal folder (default the journal folder from broker.xml) With --suffix option, The journal suffix (default amq) With --paging option, The folder used for paging (default from broker.xml) With --prefix option, The journal prefix (default activemq-data) With --file-size option, The journal size (default 10485760) 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 --broker option, This would override the broker configuration from the bootstrap With --bindings option, The folder used for bindings (default from broker.xml) compact Compacts the journal of a non running server With --verbose option, Adds more information on the execution With --paging option, The folder used for paging (default from broker.xml) 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 --broker option, This would override the broker configuration from the bootstrap With --bindings option, The folder used for bindings (default from broker.xml) ```