--- title: "Exporting and Importing System Tag Configurations" --- # Exporting and Importing System Tag Configurations > There may be times when you want to export or import the configuration of a [System tag](platform\tags\types-of-tags\system-tags\system-tags.md). Unlike regular tags from a tag provider, the built-in import and export functions are disabled for System tags. ![System Tag Import and Export Functions Disabled](system-tag-import-export-disabled.png) Instead, you can use scripting functions to [import](#importing-system-tag-configurations) or [export](#exporting-system-tag-configurations) the configurations you want. This is useful when migrating a Gateway to new hardware, backing up and restoring alarm configurations, or replicating settings across development, testing, and production environments. Each example below uses a single alarm configured on the **LicenseState** tag, found in the Tag Browser under [System] > Gateway > LicenseState. ![LicenseState Alarm in Tag Browser](licensestate-alarm-in-tag-browser.png) ## Exporting System Tag Configurations ### Exporting Tags in the System Provider This example exports the configurations for all the System tags in the System provider. To export a single tag instead, see [Exporting a Targeted System Tag](#exporting-a-targeted-system-tag). 1. Open the [Script Console](platform\designer\designer-tools\script-console\script-console.md) in the Ignition Designer. ![Script Console Location in Menubar](script-console-menubar.png) 2. Use the [system.tag.exportTags()](appendix\scripting-functions\system-tag\system-tag-exportTags.md) function script below to export your System tags, replacing the `filePath` parameter with the path you want to export to: ```python title="Export System Tags Script" filePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\allSystemTags.json" tagPaths = ["[System]"] system.tag.exportTags(filePath, tagPaths) ``` ![Export All System Tag Configurations Script](export-all-system-tags.png) The export creates a JSON file named **allSystemTags.json** at the specified path. ### Exporting a Targeted System Tag You can also export a single System tag or a group of tags. This example exports only the LicenseState tag. 1. Open the [Script Console](platform\designer\designer-tools\script-console\script-console.md) in the Ignition Designer. ![Script Console Location in Menubar](script-console-menubar.png) 2. Use the [system.tag.exportTags()](appendix\scripting-functions\system-tag\system-tag-exportTags.md) function script below to export the LicenseState tag, replacing the `filePath` parameter with the path you want to export to: ```python title="Export LicenseState Tag Script" filePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\targetedSystemTag.json" tagPaths = ["[System]Gateway/LicenseState"] system.tag.exportTags(filePath, tagPaths) ``` ![Export Targeted System Tag Configuration Script](export-targeted-system-tag.png) The export creates a JSON file named **targetedSystemTag.json** at the specified path. ## Importing System Tag Configurations Importing a configuration overwrites the existing settings on any matching System tags. The examples below use the JSON files created in the export examples, so make sure the file is accessible on the Gateway you are importing to. ### Importing Tags from the System Provider This example imports the **allSystemTags.json** file from [Exporting Tags in the System Provider](#exporting-tags-in-the-system-provider). To import a single tag instead, see [Importing a Targeted System Tag](#importing-a-targeted-system-tag). 1. Open the [Script Console](platform\designer\designer-tools\script-console\script-console.md) in the Ignition Designer. ![Script Console Location in Menubar](script-console-menubar.png) 2. Use the [system.tag.configure()](appendix\scripting-functions\system-tag\system-tag-configure.md) function script below to import the **allSystemTags.json** file, replacing the `filePath` parameter with the path to your .json file: ```python title="Import allSystemTags.json File Script" filePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\allSystemTags.json" tags = system.file.readFileAsString(filePath) system.tag.configure("[System]", tags) ``` ![Import All System Tag Configurations Script](import-all-system-tags.png) Your System tags are now updated with the imported configurations. :::note You may receive an error saying *[Bad_AccessDenied("Insufficient Tag Provider Edit Permissions")]* after importing all your configurations. This happens because the imported configurations may affect tags that: * Do not exist * Are not in the same location as the export system * Cannot be edited, or are in folders that cannot be edited The imported configurations still affect the System tags that are available and in the same directory. ::: ### Importing a Targeted System Tag This example imports the **targetedSystemTag.json** file from [Exporting a Targeted System Tag](#exporting-a-targeted-system-tag). 1. Open the [Script Console](platform\designer\designer-tools\script-console\script-console.md) in the Ignition Designer. ![Script Console Location in Menubar](script-console-menubar.png) 2. Use the [system.tag.configure()](appendix\scripting-functions\system-tag\system-tag-configure.md) function script below to import the **targetedSystemTag.json** file, replacing the `filePath` parameter with the path to your .json file: ```python title="Import targetedSystemTag.json File Script" filePath = "C:\\Users\\myUser\\Desktop\\mySystemTags\\targetedSystemTag.json" tags = system.file.readFileAsString(filePath) # Unlike the previous example where all the System tags were imported to the [System] provider, # you need to specify the exact directory where the targeted tag lives. system.tag.configure("[System]Gateway", tags) ``` ![Import Targeted System Tag Configuration Script](import-targeted-system-tag.png) The specified System tag is now updated with the imported configuration.