> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/connect-3.2-en/migracion/editran-import.md).

# Editran Import

Configuration import tool for Editran Connect version 3.2 and later.

## Overview

This command-line utility allows you to import configuration easily and quickly into the Editran Connect product. It is compatible with the compressed configuration files generated by the editran-export utility. The tool can be run on the operating systems **Windows** and **RedHat**, using the corresponding binary in each case.

| Binary name          | Platform / OS |
| -------------------- | ------------- |
| *editran-import.exe* | Windows       |
| *editran-import*     | Linux         |

The binary **editran-import** is distributed together with the Editran Connect product software and is only compatible with version 3.2 and later.

You can find the tool binary **editran-import** corresponding to your operating system in the folder `<EDITRAN_CONNECT_HOME>/utils/`, where `<EDITRAN_CONNECT_HOME>` is the base installation path of the Editran Connect product obtained as an environment variable on the computer.

### Requirements

The tool must always be run from a terminal with the following requirements, depending on the indicated operating system:

* For Windows, first log in with the corresponding user who administers the product and run the editran-import tool from a **administrator terminal**.
* For RedHat, log in using the user `editran` (or equivalent) that administers the Connect product before running the import tool. This user must have permissions `sudo` to manage the Connect product services. For more information, see the section [grant sudo permissions to the editran user](#dar-permisos-de-sudo-al-usuario-editran)

For the configuration import tool to work correctly, it is necessary to ensure the following points:

* Have a license for the Editran Connect product corresponding to the installed version and know its verification PIN. The license file `licencia.dat` must be copied into the folder `<EDITRAN_CONNECT_HOME>/core/bin/SL/`.
* The license service must be running with the license loaded. If you are not sure that the license service has loaded the license file, restart the service after copying the license file into the corresponding folder mentioned above.
  * In Windows, the license service is called `EditranLicenseService`.
  * In RedHat, the license service is called `editran.license.service`.
* The Editran Connect Database service must be running.
  * In Windows, the database service is called `EditranDataServer`.
  * In RedHat, the database service is called `editran.data.server.service`.
* The main Editran Connect service must be running.
  * In Windows, the main Connect service is called `EditranMainService`.
  * In RedHat, the license service is called `editran.main.service`.

#### Grant sudo permissions to the editran user

For the tool to work correctly in RedHat environments, the user under which the tool is run, by default `editran`, must have permissions to manage the Editran Connect product services through `sudo` without having to enter a password.

**NOTE: This configuration can be removed from the system after data import.**

There are different configuration options:

* OPTION 1: add the user `editran` to the wheel group (or equivalent).
* OPTION 2: add the user `editran` to the sudo group with exclusive administration of its services.

**OPTION 1:**

Add the user `editran` to the group `wheel`.

```bash
sudo usermod -aG wheel editran
```

Depending on your RELH version, the group `wheel` may not exist. You can check the available user groups in `/etc/sudoers`.

**OPTION 2:**

To configure these permissions, an operating system administrator must create the file `/etc/sudoers.d/editran` and add the permissions to operate with the Connect services by running the following commands:

1. Create the file that will contain the authorization rules for the Connect services

```bash
sudo touch /etc/sudoers.d/editran

sudo visudo /etc/sudoers.d/editran
```

2. Add the following rules to the file and save it with the name `editran`:

```bash
Cmnd_Alias EDITRAN_SERVICES = /usr/bin/systemctl start editran.*.service, \
                               /usr/bin/systemctl stop editran.*.service, \
                               /usr/bin/systemctl restart editran.*.service

editran ALL=(ALL) NOPASSWD: EDITRAN_SERVICES
```

3. Give the new file execution permissions `0440` and owner `root`.

```bash
sudo chmod 0440 /etc/sudoers.d/editran
sudo chown root:root /etc/sudoers.d/editran
```

4. Validate that the file syntax is correct:

```bash
sudo visudo -c -f /etc/sudoers.d/editran
```

If the syntax is correct, the command will return:

```
 /etc/sudoers.d/editran: parsed OK.
```

NOTE: The systemctl path may vary depending on the distribution. Verify the correct path with `which systemctl` before creating the file. On most modern RedHat systems the path is `/usr/bin/systemctl`.

### Basic operating modes with the editran-import tool

As an introduction, the tool **editran-import** has several operating modes for an Editran Connect installation. The application scenario for each mode will depend on the state of the installation at the time the tool is used.

Three basic scenarios are defined:

1. New installation or empty installation. Configuration import from a previously exported Editran Classic with is allowed **editran-export**.
2. Modification of an installation with previously configured data. Configuration import from a previously exported Editran Classic with is allowed **editran-export**.
3. Full recovery of the configuration of a previously exported Editran Connect with is allowed **editran-export**.

Based on the three main scenarios, the tool has the following operating modes and data import modes:

| Scenario                                                                              | Operating mode                  | Mode description                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>Scenario 1.<br>New installation or empty installation</p>                          | [Mode `EMPTY`](#modo-empty)     | <p>Quick product setup on a new installation.<br>The final result will be an Editran Connect with basic configuration imported.<br>Allows the configuration import of a previously exported Editran Classic by specifying it in the tool invocation.<br></p>                                  |
| <p>Scenario 2.<br>Modification of an installation with previously configured data</p> | [Mode `RELOAD`](#modo-reload)   | <p>Reload of the minimum configuration of an installation.<br>The final result will be an Editran Connect with the minimum configuration reloaded.<br>Allows the configuration import of a previously exported Editran Classic by specifying it in the tool invocation.<br></p>               |
| <p>Scenario 2.<br>Modification of an installation with previously configured data</p> | [Mode `RESTART`](#modo-restart) | <p>Complete deletion of an installation's configuration. The final result will be an Editran Connect with the configuration restored to the installation values.<br>Allows the configuration import of a previously exported Editran Classic by specifying it in the tool invocation.<br></p> |
| <p>Scenario 3.<br>Full recovery of an Editran Connect</p>                             | [Mode `CONNECT`](#modo-connect) | Recovery of a complete Editran Connect installation previously exported. Deletes all configuration from the current installation.                                                                                                                                                             |

In summary:

* If you want to import configuration from another previous Editran Classic installation, use the modes `empty`, `reload` or `restart`, depending on the state of your Editran Connect installation and whether you want to keep the current installation configuration.
* If you want to import configuration from another previous Editran Connect installation, use the mode `connect`, assuming that all configuration performed so far in the current installation will be completely deleted.

## How to use the tool

This section details all the operation modes supported by the data import tool, as well as the parameters allowed from the command line.

### Command parameters

The available parameters to interact with the configuration import tool are:

```bash
editran-import -m <import-mode> -lic <license-code> [flags...] [-nbk]
editran-import -h
```

| Parameter                                            | Description                                                                                                                                                                                                                                         | Supported operating mode                           | Usage example                                                                                                         |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| <p><code>-m</code><br><code>--mode</code></p>        | <p>Operating mode to perform on the Connect installation.<br>Allowed values: empty, reload, restart, connect</p>                                                                                                                                    | ALL MODES                                          | <p><code>-m connect</code><br><code>--mode empty</code></p>                                                           |
| <p><code>-lic</code><br><code>--license</code></p>   | PIN code to validate the Connect license. If the license is not verified or the code is incorrect, the indicated mode cannot be run.                                                                                                                | ALL MODES                                          | <p><code>-lic 9D9B7FE0</code><br><code>--license ABCD1234</code></p>                                                  |
| <p><code>-nbk</code><br><code>--no-backup</code></p> | <p>Skips creating a backup copy of the Connect Database with the previous configuration.<br>Creating the backup may take several minutes, depending on the amount of data to preserve, and will take disk space.</p>                                | ALL MODES                                          | <p><code>-nbk</code><br><code>--no-backup</code></p>                                                                  |
| <p><code>-f</code><br><code>--file</code></p>        | Path to the compressed .zip/.tar.gz file exported with *editran-export*. If this parameter is provided, data import will be performed with the configuration contained in the specified file.                                                       | ALL MODES                                          | <p><code>-f C:\backup\data-export-connect.zip</code><br><code>--file opt/backup/data-export-editran.tar.gz</code></p> |
| <p><code>-c</code><br><code>--company</code></p>     | Name of the company to create in the Connect onboarding process.                                                                                                                                                                                    | <p>EMPTY MODE<br>RESTART MODE</p>                  | <p><code>-c "My Company Ltd."</code><br><code>--company INDRA</code></p>                                              |
| <p><code>-a</code><br><code>--admin</code></p>       | <p>Email of the global administrator user of the Connect system to be created in the onboarding process.<br>The user will be created with the default password <em>Editran0!</em> and it is recommended to change it on the user's first login.</p> | <p>EMPTY MODE<br>RESTART MODE</p>                  | <p><code>-a <admin@my-company.com></code><br><code>--admin <usuarioglobal@indra.es></code></p>                        |
| <p><code>-loc</code><br><code>--localcode</code></p> | Local code of the Connect system to configure in the onboarding process.                                                                                                                                                                            | EMPTY MODE                                         | `-loc 02345678L`                                                                                                      |
| <p><code>-u</code><br><code>--user</code></p>        | Email of a global administrator user created in the Connect system to authenticate in reload, restart and connect modes.                                                                                                                            | <p>RELOAD MODE<br>RESTART MODE<br>CONNECT MODE</p> | <p><code>-u <admin@my-company.com></code><br><code>--user <usuarioglobal@indra.es></code></p>                         |
| <p><code>-p</code><br><code>--password</code></p>    | Password of the global administrator user indicated in the parameter `--user` to authenticate in reload, restart and connect modes.                                                                                                                 | <p>RELOAD MODE<br>RESTART MODE<br>CONNECT MODE</p> | <p><code>-p P\@ssw0rd</code><br><code>--password Editran0!</code></p>                                                 |
| <p><code>-h</code><br><code>--help</code></p>        | Displays the help for the command.                                                                                                                                                                                                                  | ALL MODES                                          | <p><code>-h</code><br><code>--help</code></p>                                                                         |

<br>

The tool includes the help command `-h`, `--help` which will show information similar to that collected in the previous parameter table.

This help will indicate the required and optional parameters for each indicated operating mode. As an example of use, the command `editran-export -h` will display the following information:

```shell
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-12_10:15:20
*******************************

editran-import: Quick configuration tool for Editran Connect.

Usage:
  editran-import -m <import-mode> -lic <license-code> [flags...] [-nbk]
  editran-import -h

  -h, --help                                Displays this help.
  -m, --mode <import-mode>                  Data import mode.
                                            Valid values: empty, reload, restart, connect.
Flags common to all modes:
  -lic, --license <license-code>            Validation code for the installed license.
  -nbk, --no-backup                         Skips generating a backup with the current Connect DB configuration.
                                            WARNING: If the import process fails and no backup was generated,
                                            it may not be possible to recover a functional state of the installation.
Flags allowed by mode:
  Empty mode:
    If --file is indicated:                    --license --company --admin --file
    If --file is NOT indicated:                 --license --company --admin --loc
    -c, --company <company-name>            Company name.
    -a, --admin <admin-email>               Email of the administrator user.
    -loc, --localcode <editran-local-code>  Local code.
    -f, --file <import-data-path>           Full path to the import file.
  Connect mode:
    -f, --file <import-data-path>           Full path to the import file.
  Reload mode:
    -u, --user <user-email>                 Administrator user for login.
    -p, --password <user-password>          Password of the administrator user.
    -f, --file <import-data-path>           (Optional) Full path to the import file.
  Restart mode:
    If --file is indicated:                    --license --user --password --company --admin --file
    If --file is NOT indicated:                 --license --user --password
    -c, --company <company-name>            Company name.
    -a, --admin <admin-email>               Email of the administrator user.
    -u, --user <user-email>                 Administrator user for login.
    -p, --password <user-password>          Password of the administrator user.
    -f, --file <import-data-path>           Full path to the import file.
Usage examples:
  editran-import -m empty   -lic 1A2B3C4D -c "MY COMPANY SA" -a admin@mycompany.com -loc 02345678L
  editran-import -m restart -lic 1A2B3C4D -u user@company.com -p password -c "ACME INC" -a admin@admin.com -f C:\backup\data-export_editran.zip --no-backup
  editran-import -m connect -lic 1A2B3C4D -f /home/root/data-export_connect.tar.gz --no-backup
```

### editran-import Log File

In addition to the information shown in the execution terminal, the tool will generate a detailed log file with all actions performed and possible errors that occurred in the import process.

This log will be created at the path `<EDITRAN_CONNECT_HOME>\logs\editran-import.log`, where `<EDITRAN_CONNECT_HOME>` is the base installation path of the Editran Connect product obtained as an environment variable on the computer.

This log file will contain details of the processes and actions performed by the indicated import mode, for example:

* Information about the actions performed on the Connect Database for the different supported operating modes.
* Details of the configuration to import
* Information about the data import in the system, as well as possible errors that occurred during the process.
* Concatenated logs from other log files relevant to the import process.

### Creating a database backup copy

The tool **editran-import**, by default, generates a complete backup copy of the Editran Connect product Database before performing the indicated operating mode. This backup can be omitted to save processing time and hard disk space on the computer by specifying the parameter `--no-backup` in the command invocation.

The backup will be generated at the path `<EDITRAN_CONNECT_HOME>\tmp\data-import_<timestamp-ejecucion>\backup\` and will contain the following data:

* Database backup file, called `editrandb_dump.sql` and generated with the command *pg\_dump* from PostgreSQL.
* Folder `cfg` with the backup files of the component `Core`. It may contain the following recovery files, although this varies depending on the configuration available at the time the backup is made:
  * Folder `.rsa` with the RSA keys of the active transmissions.
  * File `ckds.des` with the DES keys configured in Connect.
  * Files `editranp.cfg` and `editranp.sdx` with the configuration of the module `Menu/P` of the component `Core`.

To save storage space, after the operating mode finishes successfully and without errors, the backup folder will be deleted automatically.

If the automatic database backup was performed and execution of the data import mode ended with errors that make correct operation of the product impossible, the tool will NOT automatically recover the previous installation. In this case, the path where that backup was created will be indicated and manual recovery of the previous state will be required.

For more information, see the section on [manual restoration of a backup copy](#restauración-manual-de-un-backup-de-seguridad)

**NOTE: Keep in mind that if automatic backup generation is skipped and the tool errors out, the installation may be left in an inconsistent state and it will not be possible to recover a functional state of the installation.**

### Data import modes

The import utility supports several data loading modes, indicated by the argument `--mode`.

Each operating mode may require various parameters entered in the command invocation.

#### EMPTY MODE: Quick setup of Editran Connect

This operating mode allows onboarding or quick startup for a new Editran Connect installation and the basic configuration of all system components. This mode is only allowed in new product installations or installations where the product has been restarted with the restart mode, where no type of configuration exists up to that point.

The empty mode will perform the following actions on an empty Editran Connect installation:

* Validation of the product license with the PIN indicated in the argument `--license`.
* Creation of a new company instance, with the alias indicated in the argument `--company`.
* Creation of a new global administrator user of the connect system, with the email indicated in the argument `--admin` and with the default password `Editran0!`.
* Configuration of the installation's local environment, including the local code, IP, and connection port for incoming connections.

In addition to the basic configuration process, the empty mode allows importing all the configuration from a previous Editran Classic installation, using the compressed configuration file obtained with the tool **editran-export**. To specify the exported configuration from another installation, indicate the absolute path to the file with the argument `--file <import-data-path>`.

NOTE: Keep in mind that to enter folder paths that contain spaces, it is necessary to use double quotes `""` so that the tool validates it correctly.

If an import file is indicated with the parameter `--file`, it will not be necessary to indicate the argument `--localcode` since the tool will configure the local environment of the product (local code, IP and connection port) with the same values exported from the previous Editran Classic installation:

* The local code(s) present in the configuration to import.
* Connection IP(s) present in the configuration to import.
* Connection port(s) present in the configuration to import.

Otherwise, if no import file is indicated, the local code to configure must be indicated with the parameter `--localcode` and the following default values will be assumed:

* The local code indicated in the argument `--localcode`.
* Default connection IP `0.0.0.0`.
* Default connection port `7777`

**Usage examples EMPTY MODE**

In this example, in a new Connect installation, with empty mode we will create the company `"INDRA S.L."`, we configure the global administrator user with the email `admin@admin.es` and default password `Editran0!`, installation local environment with local code `012345678`, default IP and Port `0.0.0.0:7777` and license with PIN `CB4A1169`.

```bash
C:\EditranConnect\utils>editran-import.exe -m empty -lic CB4A1169 -c "INDRA S.L." -a admin@admin.es -loc 012345678
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-19_16:57:09
*******************************
- Input parameters -
mode     : empty
license  : CB4A1169
company  : INDRA S.L.
admin    : admin@admin.es
localcode: 012345678
no-backup: false
Creating a Connect database backup. This may take a few minutes ...
---- Starting empty mode ----
Managing Connect services ...
Invoking onboarding in Connect
Onboarding successful
---- Empty mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

In this other example, in a new Connect installation, with empty mode we will create the company `"INDRA S.L."`, we configure the global administrator user with the email `admin@admin.es` and default password `Editran0!`, license with PIN `CB4A1169` and we will perform a data and channel import from a previous Editran Classic installation by indicating the path to the exported configuration file with the parameter `--f` . The parameter `--no-backup` avoids creating a backup of the Database before configuring Connect.

```bash
C:\EditranConnect\utils>editran-import.exe -m empty -lic CB4A1169 -c "INDRA S.L." -a admin@admin.es -f C:\Users\admin\Downloads\data-export_editran_20260120_165012.zip -nbk
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-19_16:57:09
*******************************
- Input parameters -
mode     : empty
license  : CB4A1169
company  : INDRA S.L.
admin    : admin@admin.es
file     : C:\Users\admin\Downloads\data-export_editran_20260120_165012.zip
no-backup: true
---- Starting empty mode ----
Managing Connect services ...
[Editran/P] ready to migrate
[Editran/G] ready to migrate
[Scheduler] [WARNING] no Scheduler configuration exists to migrate
[DES keys] ready to migrate
[RSA keys] ready to migrate
Invoking onboarding in Connect
Onboarding successful
Migrating profiles ...
[migrateContacts] Migrating local configuration and contacts ...
[migrateContacts] Execution finished successfully
[migrateChannels] Migrating channels ...
[migrateChannels] Execution finished, to see the result of the process check the output log
[migraGC] Migrating cryptography ...
[migraGC] Process completed. 2 records processed, 0 erroneous or unprocessed records. To see the result, check the log.
[migraGC] Updating cryptography in channels ...
[migraGC] Transmission channels linked to GC channels
Profile migration completed
---- Empty mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

As indicated in the final report, to check for possible errors that occurred during the import process, it is recommended to review in detail the log created at the path `EDITRAN_CONNECT_HOME\logs\editran-import.log` to understand and fix the problems that occurred during data import.

If you have any questions or issues with the tool, contact the support team by sending the log file.

#### RELOAD MODE: Reload of the minimum Editran Connect configuration

This operating mode allows reloading the minimum configuration of a previously configured Connect installation.

The following data sets are understood to be the minimum configuration:

* Basic installation configuration: language and translation dictionaries, application categories, system encoding, ...
* Installed licenses.
* Configured company.
* Local codes and IP addresses configured up to now.
* Existing login users with their roles and permissions in the Editran Connect system.
* Configured email servers.

This mode will completely delete the following configuration and product usage data:

* Configured remote contacts.
* Configured transmission channels.
* RSA cryptographic keys configured and exchanged with other remotes.
* Schedules.
* Transmission and alert history.

Since this is an operating mode that will delete installation data, explicit user acceptance is required indicating that they accept modifying the installation:

```txt
WARNING: all remote contact and channel configurations will be deleted.
Only the minimum configuration will be kept. Are you sure? (y/n):
```

Also, it will be necessary to authenticate in Connect by providing the email of a user with the role of `global administrator`, with the parameter `--user <user-email>`, and its access password, with the parameter `--password <user-password>`. If the indicated user does not have the role of `global administrator`, the operating mode will be rejected.

In addition to the minimum configuration reload process, reload mode allows importing the configuration of a previous Editran Classic installation, using the compressed configuration file obtained with the tool **editran-export**. In this case, due to the reload plus data import process, the resulting installation will contain the reloaded minimum configuration and the additional configuration contained in the imported file will be added.

To indicate the exported configuration of another installation, specify the absolute path to the file with the argument `--file <import-data-path>`.

NOTE: Keep in mind that to enter folder paths that contain spaces, it is necessary to use double quotes `""` so that the tool validates it correctly.

**RELOAD MODE usage examples**

In this example, on a previously configured Connect installation, reload mode will delete all configuration that is not considered minimum for the installation, while keeping all login users, license, local codes, and company data. To authenticate in this operating mode, it will be necessary to provide the email and password of a user with permissions of `global administrator` in the Connect system and consciously accept or reject that the installation will be modified.

```txt
C:\EditranConnect\utils>editran-import.exe -m reload -lic CB4A1169 -u admin@admin.es -p Editran0!
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-20_16:59:37
*******************************
WARNING: all remote contact and channel configurations will be deleted.
Only the minimum configuration will be kept. Are you sure? (y/n): s
Confirmed. Continuing...
- Input parameters -
mode     : reload
license  : CB4A1169
user     : admin@admin.es
password : ********
no-backup: false
Invoking license validation in Connect
License validation successful
Invoking login in Connect
Login successful: admin@admin.es
Creating a Connect database backup. This may take a few minutes ...
---- Starting reload mode ----
Managing Connect services ...
Obtaining the minimum Connect configuration. This may take a few minutes ...
Regenerating the Connect database. This may take a few minutes ...
Database regenerated successfully
Starting EditranMainService service ...
Regenerating the Core configuration ...
[migraContactos] Setting up local environment in the Core ...
[migraContactos] Local configuration updated
---- Reload mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

In this other example, on a previously configured Connect installation, reload mode will delete all configuration that is not considered minimum for the installation, while keeping all login users, license, local codes, and company data. Additionally, data and channel configuration from a previous Editran Classic installation will be imported, specifying the path to the exported configuration file with the parameter `--f` .

```txt
C:\EditranConnect\utils>editran-import.exe -m reload -lic CB4A1169 -u admin@admin.es -p Editran0! -f C:\Users\admin\Downloads\EXPORTS\data-export_editran_20260114_121434.zip
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-20_16:59:37
*******************************
WARNING: all remote contact and channel configurations will be deleted.
Only the minimum configuration will be kept. Are you sure? (y/n): s
Confirmed. Continuing...
- Input parameters -
mode     : reload
license  : CB4A1169
file     : C:\Users\admin\Downloads\EXPORTS\data-export_editran_20260114_121434.zip
user     : admin@admin.es
password : ********
no-backup: false
Invoking license validation in Connect
License validation successful
Invoking login in Connect
Login successful: admin@admin.es
Creating a Connect database backup. This may take a few minutes ...
---- Starting reload mode ----
Managing Connect services ...
[Editran/P] ready to migrate
[Editran/G] ready to migrate
[Scheduler] ready to migrate
[DES keys] ready to migrate
[RSA keys] ready to migrate
Obtaining the minimum Connect configuration. This may take a few minutes ...
Regenerating the Connect database. This may take a few minutes ...
Database regenerated successfully
Starting EditranMainService service ...
Regenerating the Core configuration ...
[migraContactos] Setting up local environment in the Core ...
[migraContactos] Local configuration updated
Migrating profiles ...
[migrateContacts] Migrating local configuration and contacts ...
[migrateContacts] Execution finished successfully
[migrateChannels] Migrating channels ...
[migrateChannels] Execution finished, to see the result of the process check the output log
[migraGC] Migrating cryptography ...
[migraGC] Process completed. 137 records processed, 0 erroneous or unprocessed records. To see the result, check the log.
[migraGC] Updating cryptography in channels ...
[migraGC] Transmission channels linked to GC channels
[migraGT] Migrating schedules ...
[migraGT] Process completed. 4 lines processed, 0 erroneous lines/configurations and 4 scheduled channels. To see the result, check the log.
Profile migration completed
---- Reload mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

#### RESTART MODE: Full reset or deletion of the Editran Connect configuration

This operating mode allows resetting a previously configured Connect installation. Resetting means that all user configuration will be deleted, resulting in an empty installation of the Editran Connect product, as if it had just been installed.

Since this is an operating mode that will delete all installation data, explicit user acceptance is required indicating that they accept modifying the installation:

```txt
WARNING: all Connect configuration up to now will be deleted.
Connect is going to be reset. Are you sure? (y/n)?:
```

Also, it will be necessary to authenticate in Connect by providing the email of a user with the role of `global administrator`, with the parameter `--user <user-email>`, and its access password, with the parameter `--password <user-password>`. If the indicated user does not have the role of `global administrator`, the operating mode will be rejected.

In addition to the full configuration reset process, restart mode allows importing the configuration of a previous Editran Classic installation, using the compressed configuration file obtained with the tool **editran-export**. In this case, due to the full reset process, it is necessary to perform the onboarding process before importing data, specifying the parameters `--company <company-name>` and `--admin <admin-email>`.

The resulting installation will be similar to the process performed in `empty` mode with configuration import, a newly installed Editran Connect system with the configuration imported from a previously exported file.

To indicate the exported configuration of another installation, specify the absolute path to the file with the argument `--file <import-data-path>`.

NOTE: Keep in mind that to enter folder paths that contain spaces, it is necessary to use double quotes `""` so that the tool validates it correctly.

**RESTART MODE usage examples**

In this example, on a previously configured Connect installation, restart mode will completely delete all configuration carried out up to now. To authenticate in this operating mode, it will be necessary to provide the email and password of a user with permissions of `global administrator` in the Connect system and consciously accept or reject that the installation will be modified.

```txt
C:\EditranConnect\utils>editran-import.exe -m restart -lic CB4A1169 -u admin@admin.es -p Editran0!
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-19_16:57:09
*******************************
WARNING: all Connect configuration up to now will be deleted.
Connect is going to be reset. Are you sure? (y/n)?: s
Confirmed. Continuing...
- Input parameters -
mode     : restart
license  : CB4A1169
user     : admin@admin.es
password : ********
no-backup: false
Invoking license validation in Connect
License validation successful
Invoking login in Connect
Login successful: admin@admin.es
Creating a Connect database backup. This may take a few minutes ...
---- Starting restart mode ----
Managing Connect services ...
Regenerating the Connect database. This may take a few minutes ...
Database regenerated successfully
Starting EditranMainService service ...
---- Restart mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

In this other example, on a previously configured Connect installation, restart mode will completely delete all configuration carried out up to now. To authenticate in this operating mode, it will be necessary to provide the email and password of a user with permissions of `global administrator` in the Connect system and consciously accept or reject that the installation will be modified.

Additionally, data and channel configuration from a previous Editran Classic installation will be imported, specifying the path to the exported configuration file with the parameter `--f` .

In this case, since the installation will be empty after restart, before importing channel and contact data, it is necessary to provide the onboarding parameters to create the company `--company "INDRA S.L."` and a new global administrator user of the connect system `--admin <newadmin@newadmin.es>` with default password `Editran0!`.

```txt
C:\EditranConnect\utils>editran-import.exe -m restart -lic CB4A1169 -u admin@admin.es -p Editran0! -f C:\Users\admin\Downloads\data-export_editran_20260120_165012.zip -c "INDRA S.L." -a newadmin@newadmin.es --no-backup
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-20_16:59:37
*******************************
WARNING: all Connect configuration up to now will be deleted.
Connect is going to be reset. Are you sure? (y/n)?: s
Confirmed. Continuing...
- Input parameters -
mode     : restart
license  : CB4A1169
company  : INDRA S.L.
admin    : newadmin@newadmin.es
file     : C:\Users\admin\Downloads\data-export_editran_20260120_165012.zip
user     : admin@admin.es
password : ********
no-backup: true
Invoking license validation in Connect
License validation successful
Invoking login in Connect
Login successful: admin@admin.es
---- Starting restart mode ----
Managing Connect services ...
[Editran/P] ready to migrate
[Editran/G] ready to migrate
[Scheduler] [WARNING] no Scheduler configuration exists to migrate
[DES keys] ready to migrate
[RSA keys] ready to migrate
Regenerating the Connect database. This may take a few minutes ...
Database regenerated successfully
Starting EditranMainService service ...
Invoking onboarding in Connect
Onboarding successful
Migrating profiles ...
[migrateContacts] Migrating local configuration and contacts ...
[migrateContacts] Execution finished successfully
[migrateChannels] Migrating channels ...
[migrateChannels] Execution finished, to see the result of the process check the output log
[migraGC] Migrating cryptography ...
[migraGC] Process completed. 2 records processed, 0 erroneous or unprocessed records. To see the result, check the log.
[migraGC] Updating cryptography in channels ...
[migraGC] Transmission channels linked to GC channels
Profile migration completed
---- Restart mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

#### CONNECT MODE: Import of configuration from a previous Editran Connect

This operating mode allows full recovery of the configuration of a previously exported Editran Connect with **editran-export**. Please note that this mode deletes all configuration from the current installation.

To run this mode, you must specify the pin to validate the license with the parameter `--license <license-pin>` and specify the absolute path to the configuration file of another Editran Connect installation with the parameter `--file <import-data-path>`.

NOTE: Keep in mind that to enter folder paths that contain spaces, it is necessary to use double quotes `""` so that the tool validates it correctly.

**CONNECT MODE usage examples**

This example shows how to invoke the tool using connect mode to import the configuration of a previously exported Editran Connect. It is necessary to specify in the command invocation the pin to verify the license with `-lic CB4A1169` and the absolute path to the file that we are going to import with `-f C:\Users\admin\Downloads\data-export_connect_20251217_170905.zip`.

After the import mode finishes successfully, we will have a recovered image of the previous installation, with all the channels, contacts, login users, and additional configuration that existed in the previous installation.

```txt
C:\EditranConnect\utils>editran-import.exe -m connect -lic CB4A1169 -f C:\Users\admin\Downloads\data-export_connect_20251217_170905.zip -nbk
***** EDITRAN-IMPORT-TOOL *****
 Version  : 1.0.0
 Compiled: 2026-01-20_16:59:37
*******************************
- Input parameters -
mode     : connect
license  : CB4A1169
file     : C:\Users\admin\Downloads\data-export_connect_20251217_170905.zip
no-backup: true
Invoking license validation in Connect
License validation successful
---- Starting connect mode ----
Managing Connect services ...
[DES keys] ready to migrate
[Database] ready to migrate
Regenerating the Connect database. This may take a few minutes ...
Database regenerated successfully
Starting EditranMainService service ...
[migraContactos] The OutputP file does not exist
Updating license in Connect
License updated successfully
Regenerating the Core configuration ...
[migraContactos] Setting up local environment in the Core ...
[migraContactos] Local configuration updated
[migraCanales] Setting up profiles in the Core ...
[migraCanales] Channels registered in editranP
---- Connect mode finished ----
EDITRAN-IMPORT-TOOL finished successfully
```

### Manual restoration from a backup copy

If the automatic backup of the database was performed and execution of the selected import mode ended with errors that make correct operation of the product impossible, the tool will NOT automatically recover the previous installation. In this case, the path where the backup was created will be indicated and manual recovery of the previous state will be necessary.

```txt
The backup file C:\EditranConnect\tmp\data-import_20260122_172800\backup\editrandb_dump.sql has been created with the original database configuration.
Use this file to recover the configuration manually.
Consult the manual for more information.
```

In the indicated folder you will find all the files needed to recover the installation.

To restore the database to a functional state, the script `regenerate.[bat|sh]`, present in the folder `<EDITRAN_CONNECT_HOME>/bin/pgsql` of the Connect product installation, must be used, indicating the path to the generated backup file.

The correct way to invoke the backup recovery script is:

`regenerate "/path/to/backup/editrandb_dump.sql"`

The restoration process may take several minutes depending on the size of the backup. Do not close the execution terminal until the entire process is complete.

```txt
C:\EditranConnect>cd bin/pgsql

C:\EditranConnect\bin\pgsql>regenerate.bat "C:\EditranConnect\tmp\data-import_20260122_172800\backup\editrandb_dump.sql"
==========================================
File: "C:\EditranConnect\tmp\data-import_20260122_172800\backup\editrandb_dump.sql"
Initial load: false
==========================================
Deleting schemas ...
Loading file "C:\EditranConnect\tmp\data-import_20260122_172800\backup\editrandb_dump.sql"
Updating database structure and data ...
Updating ROLE editran ...
Database regenerated successfully
See the file C:\EditranConnect\logs\regenerate.log for detailed information about the process.
```

After the backup recovery is complete, it is also necessary to copy all the contents of the folder `path/to/backup/cfg` back into the Core module configuration folder `<EDITRAN_CONNECT_HOME>/cfg`

## Execution error summary

### Running editran-export without administrator privileges

This error indicates that **editran-import** has not been executed from a terminal with administrator privileges. It must be run with those privileges to start and stop the necessary services involved in the import process.

```txt
Managing Connect services ...
Error: IMPORT_MANAGER:35: EMPTY_MODE:25: EMPTY_MODE:18: WINDOWS_SERVICES:242: WINDOWS_SERVICES:213: WINDOWS_SERVICES:184: error connecting to the SCM. Run the tool with administrator privileges.: Access is denied.
EDITRAN-IMPORT-TOOL finished with errors
```

### Database unavailable

This error indicates that the Editran Connect data service is not running and it is not possible to verify the license or perform other actions with the import tool.

```txt
Invoking license validation in Connect
Error: License cannot be validated. | DATABASE_TASK:19: SQL_EXECUTOR:34: DB unavailable.: dial tcp 127.0.0.1:5432: connectex: No connection could be made because the target machine actively refused it.
```

To solve the problem, make sure that the Connect product data service `EditranDataServer` is started and working properly before running the configuration import tool.

### Backend unavailable

This error indicates that the Editran Connect backend or main service is not running and it is not possible to perform actions with the import tool, such as user verification or invocation of data migration processes.

```txt
Invoking login in Connect
Error: IMPORT_MANAGER:18: SETUP:146: SETUP:112: LOGIN_TASK:112: WEBSERVICES:204: WEBSERVICES:360: [StatusCode: -1] Connection refused: the backend is unavailable: Post "http://localhost:8081/connect-back/login": dial tcp 127.0.0.1:8081: connectex: No connection could be made because the target machine actively refused it.
```

To solve the problem, make sure that the main service `EditranMainService` is started and working properly before running the configuration import tool.

### Error choosing empty mode. Onboarding already invoked

This error indicates that the selected operating mode `EMPTY` is not correct. The installation has already performed the product onboarding previously and it cannot be run again. Check the status of your installation before running one of the operating modes.

```txt
Invoking onboarding in Connect
Error: IMPORT_MANAGER:35: EMPTY_MODE:36: ONBOARDING_TASK:99: WEBSERVICES:177: This method can no longer be invoked again
EDITRAN-IMPORT-TOOL finished with errors
```

### The selected mode does not allow importing the indicated configuration file

The following errors indicate that the selected operating mode is not compatible with the type of configuration file to be imported indicated when invoking the command.

```txt
Error: IMPORT_MANAGER:18: SETUP:163: IMPORT_FILE:61: IMPORT_FILE:29: the selected reload mode does not allow importing the indicated connect configuration file.
Use another operating mode or indicate a file with compatible editran configuration.
EDITRAN-IMPORT-TOOL finished with errors
```

```txt
Error: IMPORT_MANAGER:18: SETUP:163: IMPORT_FILE:61: IMPORT_FILE:25: the selected connect mode does not allow importing the indicated editran configuration file.
Use another operating mode or indicate a file with compatible connect configuration.
EDITRAN-IMPORT-TOOL finished with errors
```

To import configuration from a product `Editran Classic` previously exported, only the modes `empty`, `reload` and `restart`. The specific choice of mode will depend on the state of the installation of `Editran Connect`.

To import configuration from another previous installation of `Editran Connect`, only the mode `connect`, assuming that all configuration performed so far in the current installation will be completely deleted.

### The indicated user is not registered in Editran Connect

This error indicates that the login data provided to the command are not correct. It may be that the user indicated in the parameter `--user <user-email>` is not registered in the Connect system, or that the password indicated in the parameter `--password <user-password>` is not correct.

```txt
Invoking login in Connect
Error: IMPORT_MANAGER:18: SETUP:146: SETUP:112: LOGIN_TASK:112: WEBSERVICES:224: Incorrect user (admin@admin.es) or password: Unauthorized
EDITRAN-IMPORT-TOOL finished with errors
```

Check the access credentials to the system carefully to fix the error. If the error persists, try resetting the access password for the indicated user following the procedure `Don't remember your password?` available from the Connect login view.

### The indicated user does not have Global Administrator permissions

This error indicates that the user supplied to validate the operating mode does not have `Global Administrator` privileges on the Connect system.

```txt
Invoking login in Connect
Error: IMPORT_MANAGER:18: SETUP:146: SETUP:112: LOGIN_TASK:112: WEBSERVICES:217: The indicated user does not have Global Administrator permissions. ROLE Advanced Operator
EDITRAN-IMPORT-TOOL finished with errors
```

You must indicate a user with the necessary privileges to operate with the tool **editran-import**. If you have doubts about your role in the Connect system, contact your system administrator.

### The indicated path to the import file is incorrect

This error indicates that the path to the import file indicated in the parameter `--file <import-data-path>` is not correct.

```txt
Error:  [Validation] invalid parameter value --file: C:\Users\admin\Downloads\data-export_connect_20251217_170905.
 Valid values The compressed configuration file does not exist or is not accessible.
```

Check carefully that the name of the import file is correct, that the full path to the file is correct, and that the path does not contain spaces.

To enter folder paths that contain spaces, it is necessary to use double quotes `""` so that the tool validates it correctly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/connect-3.2-en/migracion/editran-import.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
