Magnolia 5.4.6+. The JCR Tools app includes four subapps that allow you to work with JCR content:
- Queries: Execute JCR queries in any workspace.
- Dumper: Create a dump of any workspace.
- Exporter: Export JCR content in different formats.
- Importer: Import JCR content from XML.
The app is configured in
/modules/jcr-tools/apps.The Tools app group that the app belongs to is only available to the
superuser role. This is configured in the app launcher layout.
Query subapp allows you to run JCR queries. The tool is a good place to test queries. You can write queries in SQL-2, SQL and XPath and run them on any workspace. See JCR Query Cheat Sheet for example queries.
The Query subapp only returns lists of nodes. While you can specify "columns" in your queries, these are discarded and only paths will be returned.
eg. A query like
SELECT title, foo FROM [mgnl:category] will return results like
Dumper subapp allows you to create a dump of any Magnolia workspace. You can set the base path and path level from which to dump the data.
Exporter subapp allows you to export files from all workspaces, including those where the Export action is not available in the workspace-specific app, for example in the Security and Forums apps. You can export in XML, GZIP or ZIP format, and format XML files.
Magnolia offers a number of ways to export data, see Importing and exporting JCR data for more and instructions on using the tool.
Importer subapp allows you to import XML files into any Magnolia workspace, including those where the Import action is not available in the workspace-specific app, for example in the Security and Forums apps. You can set the base path and behavior for the imported data. Behavior options are:
- Generate a new id for imported nodes.
- Only import if no existing node.
- Remove existing nodes with the same id.
- Replace existing nodes with the same id.
Magnolia offers a number of ways to import data, see Importing and exporting JCR data for more and instructions on using the tool.