Data Migration Center

Liferay DXP 2023.Q4+/Portal 7.4 GA102+ Beta Feature

Important

Currently, this feature is behind a beta feature flag (COMMERCE-8087). The data migration center currently only supports the import and export of object definitions, object entries, and API applications. Read Beta Feature Flags for more information.

The data migration center makes it easy for you to move your object definitions and object entries between Liferay installations.

To access the data migration center,

  1. Navigate to Global Menu (Global Menu) → ApplicationsData Migration Center.

    The data migration center is found under applications.

  2. Click the Import and Export tab to see a list of import and export tasks and their status. Click the Actions (Actions icon) icon next to export/import tasks to download files from previous tasks.

  3. Click the Templates tab to see a list of import and export templates.

With the data migration center, you can

Exporting Object Definitions

  1. Click Add (Add icon) and select Export File.

  2. (Optional) In the next page, select an export Template if using a previously saved template.

  3. Choose ObjectDefinition (v1_0 - Liferay Object Admin REST) as the Entity Type.

    If the ObjectDefinition (v1_0 - Liferay Object Admin REST) option is not showing, select a different export file format: JSON, JSONL, or JSONT.

  4. Select one of the Export File Formats.

    Note

    The data migration center only supports the JSON and JSONL file format for importing object definitions.

    If exporting to use in conjunction with batch client extensions, select the JSONT file format. JSONT is required for *.batch-engine-dat.json files.

  5. Under the Fields section, select the object definition fields you want to export.

    You must select at least one field.

    Select the object definition fields you wish to export.

  6. (Optional) Click Save as Template to save the export settings for future use. Give the template a name and click Save.

  7. Finally, click Export to export the object definitions.

  8. A window appears to display the export task. When the job finishes, click Download to download a zip file to your local machine.

    Note

    Closing the window doesn’t stop the export/import task. Once it’s finished, you can download the file from the Import and Export tab.

    Click download to download a zip file.

Importing Object Definitions

  1. Click Add (Add icon) and select Import File.

  2. In the next page, enter a Name for the new import task.

  3. (Optional) Select an import Template if using a previously saved template.

  4. Choose ObjectDefinition (v1_0 - Liferay Object Admin REST) as the Entity Type.

  5. Check the box to have the import task stop or continue upon error.

  6. Under Import Strategy, choose to Add or Update Records or Only Add New Records.

    With Only Add New Records, if an entity already exists, the import task fails with an error. Select Add or Update Records instead to have the data migration center overwrite the existing entity or create a new one if it doesn’t exist.

  7. Under Update Strategy, choose Update Changed Record Fields or Overwrite Records.

    With Overwrite Records, the whole entity is updated. With Update Changed Record Fields, only the fields defined in the import file are updated, and the rest of the existing values are left alone.

  8. Under file settings, click Choose File and locate the file that contains the object definitions to import.

    Note

    The data migration center only supports the JSON and JSONL file format for importing object definitions.

    Select the file that contains the object definitions to import.

  9. Under Import Mappings, make your mapping changes by selecting the drop-down list under Source File Field.

    Make any mapping changes under the import mappings section.

  10. (Optional) Click Save as Template to save the export settings for future use. Give the template a name and click Save.

  11. Click Next to continue the import. In the pop-up window, click Start Import.

  12. The pop-up window shows the progress of the import task. Click Close when completed.

    If an error occurs in the import task, return to the main data migration page and click Options (Options icon) to download an error report.

  13. Navigate to Global Menu (Global Menu) → Control PanelObjects to verify the imported object definition.

Exporting Object Entries

To export object entries, follow most of the process as if you were Exporting Object Definitions.

Here are the main differences:

  • Instead of choosing ObjectDefinition (v1_0 - Liferay Object Admin REST) as the Entity Type, select the object you want to export (e.g. C_YourObject (v1_0 - Liferay Object REST)). See creating and managing objects to learn more about objects.

  • Liferay DXP 2024.Q1+/Portal 7.4 GA112+ If your object definition is site-scoped, you can define a Scope by selecting a site from a list and exporting entries from the selected site.

    With site-scoped object definitions, export object entries from a specific scope.

  • Liferay DXP 2024.Q1+/Portal 7.4 GA112+ You can select comma-separated values (CSV) files as the Export File Format.

    The header is always included in the generated CSV file.

    When using the CSV format, see which fields are supported and can be selected for export in the Fields list.

    Important

    CSV files currently support these field types: Aggregation, Attachment, Boolean, Date, Date and Time, Decimal, Encrypted, Formula, Integer, Long Integer, Long Text, Multiselect Picklist, Picklist, Precision Decimal, Rich Text, and Text. Object Definitions are not supported.

    Export only supported fields.

Importing Object Entries

To import object entries, follow most of the process as if you were Importing Object Definitions.

Note

Make sure your object exists before attempting to import its entries.

Here are the main differences:

  • Instead of choosing ObjectDefinition (v1_0 - Liferay Object Admin REST) as the Entity Type, select the object you want to import (e.g. C_YourObject (v1_0 - Liferay Object REST)). See creating and managing objects to learn more about objects.

  • Liferay DXP 2024.Q1+/Portal 7.4 GA112+ If your object definition is site-scoped, you can define a Scope by selecting a site from a list and importing entries to the selected site.

  • Liferay DXP 2024.Q1+/Portal 7.4 GA112+ You can import object entries from comma-separated values (CSV) files.

    Add a CSV file and configure whether it has headers.

    Define the CSV separator—a character used to separate individual fields within a CSV file. Typically, this is a comma, but you can use different characters like semicolons or pipes.

    Also, specify the CSV enclosure, which encloses the entire field within the enclosure characters. You can use double or single quotation marks.

    For example: if you define a comma as the separator and double quotation marks as the enclosure, and you have a field like “New York, USA”, the comma is not considered a separator because it’s enclosed within the double quotation marks. Rather than two fields (“New York” and “USA”), you have only one (“New York, USA”)

    If the CSV file contains unsupported field types, no file format error is shown, and the process tries to load the entries.

    Important

    CSV files currently support these field types: dateandtime, date, decimal, integer, longint, longtext, precisiondecimal, richtext, text, and picklist.

    Define the CSV separator and enclosure when importing a CSV file.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy