export-import extension CLI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Schlumberger
    Junior Member
    • Mar 2023
    • 19

    export-import extension CLI

    Hello together,

    I have the following question or problem with the import-export extension.

    When I use it on the CLI, it does not take over the options that I pass there.

    The extension always uses the settings that are defined in the
    espocrm/custom/Espo/Modules/ExportImport/Resources/metadata/app/exportImport.json.

    My call is e.g.
    bin/command export-import export --format=json --config true --customization true --export-path="[rest of path]/transfer/export"


    Is it possible to save the "exportImport.json" elsewhere and call it specifically?

    Many thanks for your help
    Michael

    Versions:
    espoCRM 9.01​​​​​​​
    ​PHP 8.4.3
    Export Import 2.6
    Ubuntu 22​
  • lazovic
    Super Moderator
    • Jan 2022
    • 836

    #2
    Hi Michael Schlumberger,

    Please tell me if I understand correctly that you want a specific file generated by the Export Import extension command to be located outside the path you specified in this command?

    Comment


    • Michael Schlumberger
      Michael Schlumberger commented
      Editing a comment
      Hello,

      Thank you for your reply.
      Our problem is that the parameters in the command are not taken into attention.
      Unfortunately, I cannot understand which settings are used for the export.

      In other words, the parameters that I pass in the CLI are not taken into account or are not processed as specified

      I have the impression that it simply uses the default settings as if I did not specify any parameters.
      Like bin/command export-import export without parameters
  • lazovic
    Super Moderator
    • Jan 2022
    • 836

    #3
    Michael Schlumberger,

    EspoCRM v9.0.1
    Export Import v2.6.0

    Screenshot from CLI:

    Click image for larger version

Name:	image.png
Views:	11
Size:	76.4 KB
ID:	114440
    Correct command:
    Code:
    sudo bin/command export-import export --format=json --path="./custom-path-export-import" --skip-data
    As we can see, the folder is successfully created on its own and all files are placed in it.

    Please read the documentation for the Export Import extension: https://docs.espocrm.com/extensions/...mport/overview.
    You can pay special attention to the usage examples: https://docs.espocrm.com/extensions/...ort/#use-cases.

    Let me know if you have any problems with this issue again.​

    Comment

    • Michael Schlumberger
      Junior Member
      • Mar 2023
      • 19

      #4
      Hello,
      Thank you for your answer.
      I have found the error thanks to your help.
      In the old version - see also on Github
      the path command was: --export-path now I have seen that it is only --path

      Example github

      Click image for larger version

Name:	image.png
Views:	4
Size:	12.9 KB
ID:	114444

      I simply overlooked it in the newer documentation.😊
      Thank you for your test and screenshot, now it works.​👍

      Comment

      Working...