JCR Tools app
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 to XML or YAML.
-
Importer: Import JCR content from XML or YAML.
The JCR Tools app replaces three pre-5.4.6 legacy apps and combines them into a single app.
|
Configuration
The JCR Tools 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
The 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 the Community Wiki JCR Query Cheat Sheet for example queries.
The Query subapp only returns lists of nodes. While you can specify A query like
|
The Result Item Type field is required and mainly used for filtering queries (for example, The same kind of filtering can be achieved through an XPath, for example:
Alternatively, you can include restrictions in a WHERE clause, such as the following query.
|
Dumper subapp
The 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
The Exporter subapp allows you to export files from all workspaces, including those where the Export action isn’t available in the workspace-specific app, for example in the Security app. You can export in XML or YAML format and compress to GZIP or ZIP format.
Magnolia offers a number of ways to export data, see Importing and exporting JCR data for bootstrapping for more and instructions on using the tool. |
Importer subapp
The Importer subapp allows you to import XML or YAML files into any Magnolia workspace, including those where the Import action isn’t available in the workspace-specific app, for example in the Security app. You can set the base path and behavior for the imported data. Behavior options are:
-
Only import if no existing node.
-
Generate a new id for imported nodes (XML only).
-
Remove existing nodes with the same id (XML only).
-
Replace existing nodes with the same id (XML only).
Magnolia offers a number of ways to import data, see Importing and exporting JCR data for bootstrapping for more and instructions on using the tool. |
Ensure you have copied any necessary templates from light module folders when importing pages into the website workspace. Without the templates referenced in the imported pages, the pages can’t be displayed or edited.
|