The import feature is available in the Export Import extension.
This extension works via console (CLI). Commands should be executed from the root directory
of your EspoCRM instance.
bin/command export-import import --format=json --path="./data/export-import" --import-type=createAndUpdate
Confirmation of running the import. By default, a prompt will be displayed.
An import path. The default value is ./data/export-import
. Example: --path="PATH"
.
Skip importing data. By default, all data will be imported.
Skip importing all customization made for the instance. By default, all customization will be imported.
Skip importing configuration data. By default, all configuration data will be imported.
Skip importing internal configuration data which are stored at config-internal.php
.
Use --user-password
in order to set a user password since the passwordSalt
will not be imported.
!!! note
- 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.
A list of Entity Types. If omitted, then all entity types are applied. Example: --entity-list="ENTITY_TYPE1, ENTITY_TYPE2"
Supported values:
- a string, e.g.
"Account"
; - a string which is separated by a comma, e.g.
"Account, Contact"
.
Note: This option works along with the --entity-list
option only.
This option enables importing all customization, ignoring the --entity-list
option for customization.
Skip importing data and customization for related entities. This option is used in conjunction with --entity-list
. By default, this option is off
.
An import type. The default value is createAndUpdate
. Example: --import-type="TYPE"
.
Available values:
create
createAndUpdate
update
Activate all imported users. The Is Active
option will be defined as true
.
Deactivate all imported users. The Is Active
option will be defined as false.
In order to keep at least one active user, use --user-active-list="admin"
.
Define a list of active users. The value can be a list of ID
or User Name
. Other users will be deactivated. Example: --user-active-list="admin"
.
Available values:
a string
, e.g."admin"
,a string which is separated by a comma
, e.g."admin, 65d34ab18e81e286e"
.
Define a list of users to be skipped. The value can be a list of ID
or User Name
. Example: --user-skip-list="admin"
.
Available values:
a string
, e.g."admin"
,a string which is separated by a comma
, e.g."admin, 65d34ab18e81e286e"
.
A user password for all imported users. Example: --user-password="PASSWORD"
.
For resetting the password, use bin/command set-password [username]
.
Skip changing passwords for existing users. Example: --skip-password"
.
Use --user-password
in order to set a user password.
To update all currency fields. This option depends on currency
. If the currency
option is not defined, the default currency will be used instead. By default, this option is off
.
Currency symbol. If not defined, the default currency will be used instead. Example: --currency="USD"
.
Current time for the createdAt
field. By default, this option is off
.
This option allows to skip importing data for defined entities. Example: --entity-skip-list="ENTITY_TYPE"
.
Available values:
a string
, e.g."Account"
,a string which is separated by a comma
, e.g."Account, Contact"
.
This option allows to import data for entities which are disabled by default, in exportImportDefs
with the "exportDisabled": true
or "importDisabled": true
option. Example: --entity-hard-list="ENTITY_TYPE"
.
Available values:
a string
, e.g."ScheduledJob"
,a string which is separated by a comma
, e.g."ScheduledJob, ScheduledJobLogRecord"
.
This option allows to import data for config options which are disabled by default. Ex. --config-hard-list="CONFIG_OPTION"
.
The default list is defined in application/Espo/Modules/ExportImport/Resources/metadata/app/exportImport.json
.
Available values:
a string
, e.g."database"
,a string which is separated by a comma
, e.g."database, siteUrl"
.
This option allows to define a custom create
import type for specified entity types. Example: --entity-import-type-create="ENTITY_TYPE"
.
Available values:
a string
, e.g."User"
,a string which is separated by a comma
, e.g."Account, Contact"
.
This option allows to define a custom update
import type for specified entity types. Example: --entity-import-type-update="ENTITY_TYPE"
.
Available values:
a string
, e.g."User"
,a string which is separated by a comma
, e.g."Account, Contact"
.
This option allows to define a custom createAndUpdate
import type for specified entity types. Example: --entity-import-type-create-and-update="ENTITY_TYPE"
.
Available values:
a string
, e.g."User"
,a string which is separated by a comma
, e.g."Account, Contact"
.
bin/command export-import import --format=json --path="./data/export-import" --skip-internal-config --skip-password
bin/command export-import import --format=json --path="./data/export-import" --skip-data --skip-config
bin/command export-import import --format=json --path="./data/export-import" --skip-data --skip-config --entity-list="Account"
bin/command export-import import --format=json --path="./data/export-import" --skip-data --skip-config --entity-list="Account" --skip-related-entities
bin/command export-import import --format=json --path="./data/export-import" --import-type=createAndUpdate --entity-list="Account"
bin/command export-import import --format=json --path="./data/export-import" --import-type=createAndUpdate --entity-list="Account" --skip-related-entities