Import Export Tool
You can import and export data to and from an Elastic Path Commerce database using the Import-Export tool. The Import-Export tool is used to:
- Migrate data between Elastic Path environments, such as development to staging or staging to production
- Export data to third party applications
- Import data from third party applications
- Import and export data policies from and to Elastic Path Commerce
- Import and export customer consent details from and to Elastic Path Commerce
System Requirements and Compatibility
Import-Export functionality is version dependent. Ensure that the version numbers of your Elastic Path Commerce deployment and the Import-Export tool are the same. Furthermore, data packages exported from one Elastic Path Commerce version might not be compatible with other versions. You must use the Import-Export tool version that matches your Elastic Path deployment’s version.
Installing Import Export Tool
To install the Import Export tool:
Unzip the import/export zip file
ext-importexport-cli-<version>-bin.zipto your Import/Export directory.
importexporttool.configfile following the instructions at Configuring Environment Settings for Data Export
To run the tool, follow the instructions at Exporting Data and Importing Data
Ensure that the appropriate JDBC driver libraries are on the classpath of the Import-Export tool. Files placed in the
libs subdirectory are automatically added to the classpath.
For example, if your Elastic Path deployment is using a MySQL database, copy the MySQL JDBC connector jar file to the
Integrity Constraints and Import Order
When importing data into Elastic Path, it is critical to ensure that objects are imported in the correct order. For example, every category must be associated with a catalog. In the Elastic Path database, a constraint is defined to ensure that a category cannot be created without specifying a parent catalog that already exists in the database. Thus, if you attempt to import a category and its associated catalog does not exist, an error will occur and the category is not imported.
The order that packaged objects are imported is automatically determined by the Import-Export tool when the package was exported. This information is stored in the manifest XML file inside the import package. The contents of the manifest XML file must not be modified manually under any circumstance.
Using the Data Sync Tool and the Import-Export Tool
The Data Sync Tool and the Import-Export Tool can populate Elastic Path Commerce with data. The Import-Export Tool is intended primarily for bulk data population. The Data Sync Tool is intended to synchronize incremental changes from one Elastic Path deployment to another (for example, from a staging server to a production server). It’s important to use these tools correctly in order to avoid conflicts and ensure that objects can be synchronized.
Do not use Import-Export to import the same data in two deployments if you are using or planning to use the Data Sync Tool to keep those deployments synchronized. Some objects’ GUIDs are generated automatically during the import operation. If the objects are imported into both deployments using the Import-Export Tool, the Data Sync Tool will not be able to synchronize them because they do not have the same GUIDs.