Skip to main content
Skip table of contents

Export and Import Configuration - cfg

The following commands allow you to export the configuration settings to a text file and import from a text file. The exported settings are represented as a JSON object in the text file.

You might want to use these commands as an alternative to changing settings individually in SuperADMIN. For example, you can export the current configuration to a text file, make your changes, and then reimport the updated configuration.

You are also recommended to take regular backups of your configuration. See Backup Strategy for more information.

Export Configuration

DescriptionExport the current configuration settings to a text file containing a JSON object.
Usage

Export the entire configuration:

CODE
cfg save <filename>

Export the SuperWEB2 configuration settings:

CODE
cfg global superweb2 save <filename>

Export the configuration for a specific dataset:

CODE
cfg db <dataset_id> superweb2 save <filename>

The <filename> can contain any characters that are valid for the operating system you are using (including spaces). Do not use quotes even if the filename contains spaces.

You can either specify a full path to the filename, or a path relative to the SuperADMIN console directory (which will be C:\ProgramData\STR\SuperADMIN\console if you installed to the default location).

You must have permission to write to the specified directory, and any directories specified in the filename path must already exist.

Examples
CODE
cfg global superweb2 save E:\Config\SuperWEB2 Global Config.json
cfg db bank superweb2 save E:\Config\SuperWEB2 Retail Banking Config.json
cfg save E:\Config\Configuration.json

You can also export the configuration for a particular node (and its children). For example:

CODE
cfg global superweb2.valueSetLabels save E:\Config\SuperWEB2 Value Set Labels.json
cfg global superweb2.mapping.thematic save E:\Config\SuperWEB2 Mapping Configuration.json

Import Configuration

Description

Import configuration from a text file containing a JSON object.

Any configuration you import will completely replace the current configuration at that level. For example:

  • If you import the global configuration settings this will replace any existing configuration at the global level (but will not affect any dataset specific configuration).
  • If you import the entire configuration this will replace all current configuration settings.
Usage

Import the entire configuration:

CODE
cfg load <filename>

Import the SuperWEB2 configuration settings:

CODE
cfg global superweb2 load <filename>

Import the configuration for a specific dataset:

CODE
cfg db <dataset_id> superweb2 load <filename>

The <filename> can contain any characters that are valid for the operating system you are using (including spaces). Do not use quotes even if the filename contains spaces.

You can either specify a full path to the filename, or a path relative to the SuperADMIN console directory (which will be C:\ProgramData\STR\SuperADMIN\console if you installed to the default location).

When importing the entire configuration, the file must contain a JSON object with keys organised under global and db/<dataset_id>. You can export the current configuration to see an example of the required structure.

Examples
CODE
cfg global superweb2 load E:\Config\SuperWEB2 Global Config.json
cfg db bank superweb2 load E:\Config\SuperWEB2 Retail Banking Config.json
cfg load E:\Config\Configuration.json 

You can also import the configuration for a particular node (and its children). For example:

CODE
cfg global superweb2.valueSetLabels load E:\Config\SuperWEB2 Value Set Labels.json
cfg global superweb2.mapping.thematic load E:\Config\SuperWEB2 Mapping Configuration.json

Import Filesize Limits

There is a maximum limit on the size of file you can upload when importing configuration. By default, this is set to 8MB. If you have a larger configuration file you need to upload, then you can temporarily increase the limit in order to import your settings.

We do not recommend permanently changing this limit. Once you have completed your configuration changes you should revert back to the original 8MB limit. 

To make this change:

  1. Locate the file local.conf in the SuperADMIN server config directory. If you installed to the default location on Windows, this can be found in C:\ProgramData\STR\SuperADMIN\server\config
  2. Add the following line to the end of the file:

    CODE
    akka.http.parsing.max-content-length=50m

    This example sets the limit to 50MB. If your configuration file is larger than 50MB, change the value so that it is large enough to upload your file.

  3. Restart the SuperADMIN server or the SuperSTAR service.
  4. Restart the SuperADMIN console and load the configuration file.
  5. Once you have completed your changes, remove the line you added to local.conf and restart SuperADMIN again.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.