[comment]: # ({566c4be6-566c4be6})
# 14 Configuration export/import

[comment]: # ({/566c4be6-566c4be6})

[comment]: # ({2675e76b-265e7dfe})
#### Overview

Zabbix export/import functionality makes it possible to exchange various
configuration entities between one Zabbix system and another.

Typical use cases for this functionality:

-   share templates or network maps - Zabbix users may share their
    configuration parameters
-   upload a template to [Zabbix Community templates](https://github.com/zabbix/community-templates). Then others can
    download the template and import the file into Zabbix.
-   integrate with third-party tools - universal YAML, XML and JSON
    formats make integration and data import/export possible with third-party
    tools and applications

[comment]: # ({/2675e76b-265e7dfe})

[comment]: # ({fa663f5b-19950447})
##### What can be exported/imported

Objects that can be exported/imported are:

-   [Host groups](/manual/xml_export_import/hostgroups) (*through Zabbix API only*)
-   [Template groups](/manual/xml_export_import/templategroups) (*through Zabbix API only*) 
-   [Templates](/manual/xml_export_import/templates)
-   [Hosts](/manual/xml_export_import/hosts)
-   [Network maps](/manual/xml_export_import/maps)
-   [Media types](/manual/xml_export_import/media)
-   Images

[comment]: # ({/fa663f5b-19950447})

[comment]: # ({44b0f5b3-44b0f5b3})
##### Export format

Data can be exported using the Zabbix web frontend or [Zabbix
API](/manual/api/reference/configuration). Supported export formats are
YAML, XML and JSON.

[comment]: # ({/44b0f5b3-44b0f5b3})

[comment]: # ({f18c7067-b87bd84d})
#### Details about export

-   All supported elements are exported in one file.
-   Host and template entities (items, triggers, graphs, discovery
    rules) that are inherited from linked templates are not exported.
    Any changes made to those entities on a host level (such as changed
    item interval, modified regular expression or added prototypes to
    the low-level discovery rule) will be lost when exporting; when
    importing, all entities from linked templates are re-created as on
    the original linked template.
-   Entities created by low-level discovery and any entities depending
    on them are not exported. For example, a trigger created for an
    LLD-rule generated item will not be exported.
-   When the exported host/template contains entities supporting timeouts, the timeout values will be exported if these entities have their own timeouts configured.

[comment]: # ({/f18c7067-b87bd84d})

[comment]: # ({2a31a9dd-6ea18fa7})
#### Details about import

-   Import stops at the first error.
-   When updating existing images during image import, "imagetype" field
    is ignored, i.e., it is impossible to change image type via import.
-   When importing hosts/templates using the "Delete missing" option,
    host/template macros not present in the import file will be deleted from  
    the host/template after the import.
-   Empty tags for items, triggers, graphs,
    discoveryRules, itemPrototypes, triggerPrototypes, graphPrototypes
    are meaningless, i.e., it's the same as if it was missing.
-   If entities of the imported host/template have their own timeouts configured, they will be applied; otherwise, proxy/global timeouts will be applied.
-   Import supports YAML, XML and JSON, the import file must have a
    correct file extension: .yaml and .yml for YAML, .xml for XML and
    .json for JSON. See [compatibility information](/manual/appendix/compatibility)
    about supported XML versions.
-   Import supports configuration files only in UTF-8 encoding (with or without [BOM](https://en.wikipedia.org/wiki/Byte_order_mark));
    other encodings (UTF16LE, UTF16BE, UTF32LE, UTF32BE, etc.) will result in an import conversion error.

[comment]: # ({/2a31a9dd-6ea18fa7})

[comment]: # ({a75e1ce6-790544d4})
#### YAML base format

The YAML export format contains the following nodes:

-   Root node for Zabbix YAML export
-   Export version

```yaml
zabbix_export:
  version: '7.2'
```

Other nodes are dependent on exported objects.

[comment]: # ({/a75e1ce6-790544d4})

[comment]: # ({a4f437a4-8c839240})
#### XML format

The XML export format contains the following tags:

-   Default header for XML documents
-   Root tag for Zabbix XML export
-   Export version

```xml
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>7.2</version>
</zabbix_export>
```

Other tags are dependent on exported objects.

[comment]: # ({/a4f437a4-8c839240})

[comment]: # ({bdf635b7-239421b8})
#### JSON format

The JSON export format contains the following objects:

-   Root object for Zabbix JSON export
-   Export version

```json
{
    "zabbix_export": {
        "version": "7.2"
    }
}
```

Other objects are dependent on exported objects.

[comment]: # ({/bdf635b7-239421b8})
