Export Import

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tarasm
    Senior Member
    • Mar 2014
    • 2580

    #1

    Export Import

    ​​Export Import extension is a tool for exporting and importing data in EspoCRM. It allows you to transfer files, settings and customizations between instances using commands launched in the CLI with a different set of parameters.​

    Github repository: https://github.com/espocrm/ext-export-import

    Releases: https://github.com/espocrm/ext-export-import/releases
    Job Offers and Requests
  • murugappan
    Active Community Member
    • Aug 2017
    • 545

    #2
    Hi,

    Need for additional features. Please allow me to provide the details:

    (1) Problem Statement

    The existing version either exports an entity with all its data or exports all the customization done to an instance. We (in the ASEAN Group) feel that exporting all the customization may be a moot feature as we could already do this just by copying the custom->espo folder to the new instance. Exporting the entity with all its data may be one option for others but does not help people who want to re-engineer their systems.

    (2) Feature request:

    Provide additional parameter (--structure-only) where the extension can export only the customization related to the selected entity.

    (3) Use Case

    This feature is highly useful for people who want to re-engineer their CRM or who want extract and use only certain entities to an totally new instance serving another purpose.

    There are many of us seeking this. Appreciate consideration and early enhancement to this extension.
    Last edited by murugappan; 02-10-2024, 10:14 AM.

    Comment

    • murugappan
      Active Community Member
      • Aug 2017
      • 545

      #3
      Hi tarasm

      I tested the export-import version 2.0.0.

      I wanted to export and import each customized entity from version < 7.3 to another instance for re-engineering. This is what i did:
      1. Create a 8.1.4 instance and copied the custom->espo folder to the new instance
      2. Did a hard rebuild on the new instance
      3. Used the export-import and exported the customization without the relationships.
      4. Copied the exported folders to the instance which i was re-engineering
      5. Perform the import.

      Everything worked super well. I greatly appreciate how much effort this has saved me. This cut down my re-engineering time by 45%. Thank you so much

      Comment

      • murugappan
        Active Community Member
        • Aug 2017
        • 545

        #4
        tarasm Hi,

        Wonder if you would entertain an enhancement request.

        The current export-import extension is fantastic.What we need now. to complete the functionality, is to be able to export an entity "Account" from one instance and then import it into another instance as different entity "Provider". The reason: Though the "Account" entity is already in the new instance, we need to create another entity called "Provider: which is nearly a clone of "Accounts" in its properties and fields. We have many use-cases. E.g "Insurer" entity which is the same.

        Comment

        • Paulina
          Member
          • Feb 2022
          • 57

          #5
          Hello,

          How can I export the customization for only a single entity?

          I tried the following command:
          Code:
          export-import export --format=json --path="./data/product-customization" --skip-data --skip-config --entity-list="Product"

          However, the generated product-customization folder contains only manifest.json. None of the Product entity customizations (fields, relationships, layouts, etc.) are included.

          Is there a way to export only the customizations related to the Product entity, without exporting the entire EspoCRM customization?

          What would be the correct command or recommended approach?

          Thanks!

          Comment

          • victor
            Active Community Member
            • Aug 2022
            • 1232

            #6
            According to the documentation about --entity-list="" option:

            • For advanced users only.
            • The defined list will be imported only with data of Many-to-One, One-to-One Right, Children-to-Parent relationships.
            • The Many-to-Many, One-to-Many, One-to-One Left, Parent-to-Children relationships for related entities should be defined in the list additionally.
            So you must specify in --entity-list="" in addition to Product the rest of the entities you need for export, which have Many-to-Many, One-to-Many, One-to-One Left, Parent-to-Children relationships from Product entity --> to related entities. But just in case, it is better to specify the entire list of related entities from the Product entity (it turns out even faster this way). To do this, open Administration > Entity Manager > Product > Relationships and in the Foreign Entity column copy the necessary entities for --entity-list="".

            For example, you can use the following commands, but note that you may have a different --path="" and that you may have additional entities in --entity-list="" . That is why I included my custom entity CashAR in both commands (you may not have it, but there may or may not be other entities).

            Export:
            Code:
            sudo bin/command export-import export --format=json --path="/var/www/html/build/export-import" --skip-data --skip-config --skip-config --skip-config --entity-list="Product, ProductAttributeOption, ProductAttribute, ProductBrand, ProductCategory, ProductCategory, User, InventoryAdjustmentItem, InventoryNumber, InventoryTransaction, ProductPrice, SupplierProductPrice, TaxClass, Team, Product, CashAR"
            Import:
            Code:
            sudo bin/command export-import import --format=json --path="/var/www/html/build/export-import" --skip-internal-config --skip-password --skip-config --entity-list="Product, ProductAttributeOption, ProductAttribute, ProductBrand, ProductCategory, ProductCategory, User, InventoryAdjustmentItem, InventoryNumber, InventoryTransaction, ProductPrice, SupplierProductPrice, TaxClass, Team, Product, CashAR" --import-type=createAndUpdate
            - Don't forget to make backups before testing.
            - During Export, you must have the Sales Pack extension installed on the old instance.
            - During Import, you must have the Sales Pack extension installed on the new instance.
            Last edited by victor; Yesterday, 01:03 PM.

            Comment

            Working...