Import

Contents

Import

Import

Import data from a named export into Enonic XP at the desired content path. The export has to be stored in the $XP_HOME/data/export directory. See Export and Import for more information on content export/import.

To list available configuration options, type:

$ enonic import -h

  Import data from a named export.

  USAGE:
     enonic import [command options] [arguments...]

  OPTIONS:
     -t value                A named export to import.
     --path value            Target path for import. Format: <repo-name>:<branch-name>:<node-path> e.g. 'cms-repo:draft:/'
     --xsl-source value      Path to xsl file (relative to <XP_HOME>/data/export) for applying transformations to node.xml before importing.
     --xsl-param value       Parameters to pass to the XSL transformations before importing nodes. Format: <parameter-name>=<parameter-value> e.g. 'applicationId=com.enonic.myapp'
     --skip-ids              Flag to skips ids when importing
     --skip-permissions      Flag to skips permissions when importing
     --dry                   Show the result without making actual changes.
     --auth value, -a value  Authentication token for basic authentication (user:password)
if auth param is missing and there is no valid session CLI will look for ENONIC_CLI_REMOTE_USER and ENONIC_CLI_REMOTE_PASS environment variables. See configuration section.
Example:
$ enonic import -a su:password -t myExport --path cms-repo:draft:/some-content

An XSL file and a set of name=value parameters can be optionally passed for applying transformations to each node.xml file, before importing it.

This option could for example be used for renaming types or fields. The .xsl file must be located in the $XP_HOME/data/export directory.

Contents