---
title: "Usercube-**export**-Configuration"
description: "Export Identity Manager configuration from the database to XML files, including UI-created elements, translation files, and scaffoldings."
sidebar_position: 110
---

# Usercube-**export**-Configuration

Generates in a folder the files of the configuration found in the database.

While the **deployment** process is about taking the configuration elements from the XML files to insert them in the database, the **export** process is about taking the configuration elements from the database to generate XML files:

- A basic **export** will **export** the XML configuration that was latest deployed to the database,
including images like logos and favicons;
- A **marked** **export** will **export** the whole configuration as XML files, including the configuration
elements **created via the UI**;

As Identity Manager can be configured by writing manually in XML files and/or using the UI, the **marked** **export** helps combining both.

Netwrix Identity Manager (formerly Usercube) recommends configuring Identity Manager via the UI as much as possible, and completing the configuration via XML files when needed.

- a basic **export** will **export** the translation JSON files;
- a scaffolding **export** will **export** the XML configuration generated by scaffoldings.

![Schema - **export** Process](/images/identitymanager/identitymanager-export-configuration.webp)

For **all** **export** types, Netwrix Identity Manager (formerly Usercube) recommends using as output directory a folder other than the one containing the old XML configuration. This way, the exported configuration does not overwrite the old one, and:

- the changes can be clearly viewed in a file comparison tool;
- the interesting changes can be selected individually and inserted in the old configuration, to
update the configuration while keeping any manual changes such as comments.

### Focus on the **marked** **export**

By default, the configuration elements **created via the UI** are stored in the database just like the rest of the configuration, but they are not included in **deployment** and **export** processes.

While UI elements **are not marked**, they are not included in the XML/database comparison performed during the configuration **deployment** process. It means that deploying any configuration will not affect UI elements.

On the other hand, once UI elements **are marked**, they will be included in the XML/database comparison performed during the next configuration **deployment** process. Then, if these UI elements are not in the deployed XML files, they will be removed from the database.

Be careful about what configuration to deploy and **export**.

When configuring through both the UI and XML files, make sure to:

- **export** **all** UI modifications before making changes in XML files and deploying the configuration
again;
- Deploy **all** XML modifications before making changes in the UI and exporting the configuration
again.

## Examples

### Locally vs. remotely

The following example exports an on-premise configuration via a direct connection to the database through its connection string:

```shell
./Usercube-**export**-Configuration.exe -d "C:/identitymanager/ExportedConf" <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b>
```

The following example exports a SaaS configuration via an HTTP POST request to the server of the remote configuration:

```shell
**./Usercube-**export**-Configuration.exe -d "C:/identitymanager/ExportedConf" <b>--api-url https://my_usercube_instance.com</b>**
```

To be able to **export** a SaaS configuration, you must first provide your Identity Manager administrator with identity information. See the [**export** the Configuration](../../toolkit/export-configuration.md) topic for additional information.

### Basic **export** for a change of environment

The following example exports **all** configuration elements of the database as a set of XML files, to the `C:/identitymanager/ExportedConf` folder, for example to move from the pre-production environment to the production environment.

```shell
./Usercube-**export**-Configuration.exe <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b> --configuration-directory "C:/identitymanager/ExportedConf"
```

**all** XML files from `C:/identitymanager/ExportedConf` are removed and replaced with the new set of XML files, generated based on the configuration elements from the database.

The default behavior of this tool exports **all** XML files, from the configuration elements stored in the database and the XML/database relationships, as well as logos and favicons. **Translations are not exported**.

**Most modifications made in the UI will be ignored too**.

### **export** UI configuration elements outside the role model

The following example exports **all** configuration elements as a set of XML files, including the configuration modifications made through the UI, **except any elements linked to the role model**.

```shell
./Usercube-**export**-Configuration.exe <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b> --configuration-directory "C:/identitymanager/ExportedConf" --mark-for-**export**
```

**all** XML files from `C:/identitymanager/ExportedConf` are removed and replaced with the new set of XML files, generated based on the configuration elements from the database, **including UI elements** (not role-model-related) that are now **marked** for **export**.

### **export** **all** UI configuration elements

The following example exports **all** configuration elements as a set of XML files, including **all** configuration modifications made through the UI, especially role-model-related elements.

```shell
./Usercube-**export**-Configuration.exe <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b> --configuration-directory "C:/identitymanager/ExportedConf" --mark-for-**export** --mark-rolemodel-for-**export**
```

**all** XML files from `C:/identitymanager/ExportedConf` are removed and replaced with the new set of XML files, generated based on the configuration elements from the database, including **all** UI elements that are now **marked** for **export**.

### **export** translation files

The following example exports to `C:/identitymanager/ExportedConf` the JSON translation files stored in the database, one per language, replacing the ancient versions potentially pre-existing in the output directory.

```shell
./Usercube-**export**-Configuration.exe <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b> --configuration-directory "C:/identitymanager/ExportedConf" --**export**-translation
```

### **export** scaffoldings for debug

The following example exports XML files containing the configuration generated by **all** scaffoldings. It exports one folder per scaffolding type, and in each folder one XML file per scaffolding, containing the configuration generated by the scaffolding.

```shell
./Usercube-**export**-Configuration.exe <b>--database-connection-string "data source=.;Database=Usercube;Integrated Security=SSPI;Min Pool Size=10;encrypt=false;"</b> --configuration-directory "C:/identitymanager/ConfScaffoldings" --**export**-scaffolding
```

**all** XML files from `C:/identitymanager/ConfScaffoldings` are removed and replaced with the new set of XML files, generated based on the scaffoldings from the configuration.

The scaffolding **export**'s output is meant only for viewing in debug situations and **must not be inserted in the configuration**.

## Arguments

 | Argument Name | Details | 
 | --- | --- | 
 | --configuration-directory (-d) required | **Type** String **Description** Path of a directory that will receive the exported configuration. | 
 | --default-file optional | **Type** String **Description** Path of the file where configuration items are stored by default, when they are not related to a predefined storing file. **Note:** when not specified, these items are not exported. | 
 | --**export**-scaffolding optional | **Type** No Value **Description** Exports **all** scaffoldings and the scaffolded items, i.e. **all** items generated by scaffoldings. | 
 | --**export**-translation optional | **Type** No Value **Description** Exports the JSON files containing **all** translations, by language. | 
 | --format-configuration optional | **Type** No Value **Description** Formats the configuration from the folder specified in `--configuration-directory`, in order to correspond to the **export** result. | 
 | --mark-for-**export** optional | **Type** No Value **Description** Exports **all** configuration elements that were **created via the UI**, except for those linked to the role model, i.e. the elements exported by the `--mark-rolemodel-for-**export**` option. | 
 | --mark-rolemodel-for-**export** optional | **Type** No Value **Description** Exports **all** the configuration elements linked to the role model: `SingleRole`; `CompositeRole`; `SingleRoleRule`; `CompositeRoleRule`; and the following rules when they are linked to a role: `PendingApprovalRule`; `ResourceNavigationRule`; `ResourceScalarRule`; `ResourceTypeRule`; `ResourceBinaryRule`. **Warning:** this argument cannot be used without the `--mark-for-**export**` option. | 
 | --**marked**-paths optional | **Type** String List **Description** Identifiers of the elements configured through the UI that need to be exported and thus **marked** for **export**. **Note:** used to **export** specific elements, while the `--mark-*-for-**export**` options are meant to **export** whole packages of elements. | 
 | --- | --- | 
 | --- | --- | 
 | --api-client-id optional | **Type** String **Description** Login of the account authorized by Netwrix Identity Manager (formerly Usercube) for configuration **export**/**deployment** in a SaaS environment. **Note:** soon deprecated, rather contact the support team. | 
 | --api-secret optional | **Type** String **Description** Password of the account authorized by NETWRIX for configuration **export**/**deployment** in a SaaS environment. **Note:** soon deprecated, rather contact the support team. | 
 | --api-url optional | **Type** String **Description** URL of the server to **export**/deploy the configuration to, for remote changes. **Note:** required when `--database-connection-string` is not specified. | 
 | --- | --- | 
 | --- | --- | 
 | --database-connection-string optional | **Type** String **Description** Connection string of the database. **Note:** required when `--api-url` is not specified. | 
 | --product-translation optional | **Type** No Value **Description** Path of the JSON file that contains the application's translations. See the [Import Product Translations into Identity Manager](../../../admin/ui/producttranslations.md) topic for additional information. | 
 | --scope optional | **Type** String **Description** Path of a folder or file to **export**/deploy, instead of exporting/deploying the whole configuration. | 
 | --- | --- | 
 | --- | --- | 
 | --log-level optional | **Type** LogLevel **Description** Level of log information among: `Verbose`; `Debug`; `Information`; `Warning`; `Error`; `Fatal`. | 

