7.4.3 Import/Export
A list of configuration items can be exported and imported as a CSV file.
It is possible to save a list of configuration items at a given point in time to a file, or to create and edit multiple configuration items at once.
This section describes the following items.
(1) Create an import/export template
(2) Export configuration item
(3) Import configuration item
(1) Create an import/export template
A template is a set of rules that defines the types of objects in OTOBO and the mapping of their fields to information in input and output files, as well as the format of the files. Create a template in the following way.
Select [Admin] from the main menu, and then click [Administration] - [Import/Export]. On the [Import/Export Management] screen, click the [Add template] button. Follow the transition display and fill in the following fields.
(Table) Edit common information
| Field | Required | Description |
|---|---|---|
| Name | Yes | Template name |
| Object | Yes | Select "Config Item". |
| Format | Yes | Select "CSV". |
| Valid | Yes | Select "valid". |
| Comment | No | Enter any comments. |
(Table) Edit object information
| Field | Required | Description |
|---|---|---|
| Class | Yes | Class of configuration item to be imported/exported |
| Maximum number of one element | Yes | For fields that can have multiple values in a configuration item, set the maximum number of elements. |
| Empty fields indicate that the current values are kept | Yes | Clear the checkbox. |
(Table) Edit format information
| Field | Required | Description |
|---|---|---|
| Column Separator | Yes | CSV file delimiter |
| Charset | Yes | Select "UTF-8". |
| Include Column Headers | Yes | Select "Yes". |
Click [Add Mapping Element] and add the corresponding field in the [CSV] column. The meaning of each column in the table is as follows.
(Table) Edit mapping information
| Field | Description |
|---|---|
| KEY*1 | Configuration item field name "Number" is an automatically assigned number that is unique to the entire configuration item and can be selected even if it is not included in the class definition. |
| IDENTIFIER*2, *3 | Check this box if you want to treat it as an identifier of the configuration item. The identifier is used to map each row of information in the imported CSV file to the corresponding configuration item stored in OTOBO. Check the identifier if you want to overwrite existing configuration item information during import. If not checked, the item will be registered as a new configuration item. |
| COLUMN | Indicates the corresponding column in the CSV file. It is automatically assigned from 0. |
| UP | Shifts the position of the mapping element up one position. |
| DOWN | Shifts the position of the mapping element down one position. |
| DELETE | Deletes a mapping element. |
Also, when using the template for import, be sure to register the field (key) in "(Table) Mapping elements required for import".
If you want to limit the export target, check the [Restrict export per search:] checkbox and set the search criteria in the remaining fields.
(2) Export configuration item
Select [Admin] from the main menu, and then click [Administration] - [Import/Export] to go to the [Import/Export Management] screen, where a list of templates will be displayed.
Click [Export] in the [START EXPORT] column of the template to be exported to download a CSV file based on the template settings.
Note
- Exporting configuration items downloads a UTF-8 encoded file (CSV format) with no BOM. If you open this file in a text editor, it will be displayed normally. However, if you open the file in Excel, character corruption will occur, so encode the file to UTF-8 with BOM and save it again.
(3) Import configuration item
Select [Admin] from the main menu, and then click [Administration] - [Import/Export] to go to the [Import/Export Management] screen, where a list of templates will be displayed.
Click [Import] in the [START IMPORT] column of the template to be imported and select the CSV file to be imported to retrieve and import the configuration item information from the CSV file based on the template settings.
To create a new configuration item in a CSV file, write the following.
- Ensure that appropriate values are written in the corresponding columns of the CSV file.
- If there are fields that are required by creating a new class or editing a class, the CSV file must contain the appropriate values, including the mapping elements for those fields.
- Mapping elements must include the following.
(Table) Mapping elements required for import
| Field (key) | Description |
|---|---|
| Name | Configuration item name |
| Deployment State | The deployment status of configuration items Choose from the following English values.
|
| Incident State | The incident state of configuration items Choose from the following English values.
|
Note
The following content cannot be imported or exported.
- Links between configuration items
- The import/export definition itself
When importing a CSV file exported by OTOBO into another OTOBO environment, it is necessary to create a template equivalent to the one used at the time of export in the importing environment. - Attachments