Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix by script - Avoid cross space links to DOCS56
HTML Wrap
alignright
classmenu

Related topics:

This page deals with importing and exporting data to and from the JCR. Magnolia provides functions to export data from a JCR workspace into a file, and to import data by file into a JCR workspace. This process is known as Bootstrapping. 

...

Bootstrap files

Include Page
DOCS56:_what is a bootstrap fileDOCS56:
_what is a bootstrap file

...

Many Magnolia content apps that store their data in JCR workspaces provide actions to import and export JCR data. Some examples: Pages appAssets appContacts appCategories app.

Additionally, the JCR Tools app allow you to operate on data in all Magnolia workspaces, including those where the Export and Import actions are not available in the workspace-specific app, for example in the Security app.  

Note that all the apps mentioned, including the JCR Tools app, rely on the default import and export actions defined in the module magnolia-ui-admincentral.

...

The Import and Export actions use the JCRImportCommand and JCRExportCommand commands. The commands are defined in the magnolia-ui-admincentral module and implemented in 

Javadoc resource link
0info.magnolia.importexport.command.JcrImportCommand
rangeHigherVersion5.6
classNameinfo.magnolia.importexport.command.JcrImportCommand
renderTypeasynchronous
 and 
Javadoc resource link
0info.magnolia.importexport.command.JcrExportCommand
classNameinfo.magnolia.importexport.command.JcrExportCommand
renderTypeasynchronous
 classes.

...

Info

By default new UUIDs are generated for nodes that have the same ID as an existing node in the repository. When using the JCR Tools app, you can change this behavior while using the Import tool.

Exporting and importing from the JCR Tools app

The import and export tools in the JCR Tools app allow you to operate on data in all Magnolia workspaces, including those where the Export and Import actions are not available in the workspace-specific app, for example in the Security app.  

To export:

  1. Select the Workspace where the content resides.
  2. In Base path, type the path to the node to export.
  3. Select Format: XML or YAML.
  4. Select the type of Compression: None, ZIP or GZIP.
  5. Click Execute.

...

The bootstrapping mechanism, directory location and management for Maven modules and light modules is different. See:

...

You can execute Groovy scripts on a running instance to both export and import JCR data. This type of export or import only supports XML file format. See the Groovy module and Groovy app for information about how to execute Groovy scripts on a running Magnolia instance.

...

When importing bootstrap files, we recommend you use task classes, which can handle bootstrap files called from your module version handler. For an example about how to use the module version handler, see create version handler. Magnolia provides tasks to handle bootstrap files out of the box, see

Javadoc resource link
0info.magnolia.module.delta.ModuleBootstrapTask
classNameinfo.magnolia.module.delta.ModuleBootstrapTask
renderTypeasynchronous
Javadoc resource link
0info.magnolia.module.delta.ModuleDependencyBootstrapTask
classNameinfo.magnolia.module.delta.ModuleDependencyBootstrapTask
renderTypeasynchronous
 and 
Javadoc resource link
0info.magnolia.module.delta.SamplesBootstrapTask
classNameinfo.magnolia.module.delta.SamplesBootstrapTask
renderTypeasynchronous
; you also can write a custom task for instance by extending 
Javadoc resource link
0info.magnolia.module.delta.AbstractTask
classNameinfo.magnolia.module.delta.AbstractTask
renderTypeasynchronous
.

...